File 3_5_BRANCH-r523122.diff of Package kdelibs3
------------------------------------------------------------------------
r523122 | coolo | 2006-03-27 15:12:49 +0200 (Mo, 27 Mär 2006) | 3 lines
only default to KIO if it's in the KDE category - which avoid gimp
system:/blah
------------------------------------------------------------------------
Index: kio/kio/krun.cpp
===================================================================
--- kio/kio/krun.cpp (Revision 523121)
+++ kio/kio/krun.cpp (Revision 523122)
@@ -660,8 +660,17 @@
if ( mx1.expandMacrosShellQuote( exec ) && !mx1.hasUrls ) {
Q_ASSERT( supportedProtocols.isEmpty() ); // huh? If you support protocols you need %u or %U...
} else {
- if ( supportedProtocols.isEmpty() ) // compat: assume KIO if not set
- supportedProtocols.append( "KIO" );
+ if ( supportedProtocols.isEmpty() )
+ {
+ // compat mode: assume KIO if not set and it's a KDE app
+ QStringList categories = _service.property("Categories").toStringList();
+ if ( categories.find("KDE") != categories.end() )
+ supportedProtocols.append( "KIO" );
+ else { // if no KDE app, be a bit over-generic
+ supportedProtocols.append( "http");
+ supportedProtocols.append( "ftp");
+ }
+ }
}
kdDebug(7010) << "supportedProtocols:" << supportedProtocols << endl;