I removed the error switch because it is handled by KServiceTypeTrader, it 
returns the error description directly.

Please commit if ok.
Index: libkopete/kopetepluginmanager.cpp
===================================================================
--- libkopete/kopetepluginmanager.cpp	(révision 723270)
+++ libkopete/kopetepluginmanager.cpp	(copie de travail)
@@ -360,9 +360,8 @@
 	if ( _kpmp->loadedPlugins.contains( info ) )
 		return _kpmp->loadedPlugins[ info ];
 
-	int error = 0;
-	Plugin *plugin = KServiceTypeTrader::createInstanceFromQuery<Plugin>( QLatin1String( "Kopete/Plugin" ),
-		QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, QStringList(), &error );
+	QString error;
+        Plugin *plugin = KServiceTypeTrader::createInstanceFromQuery<Plugin>( QString::fromLatin1( "Kopete/Plugin" ), QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, QVariantList(), &error );
 
 	if ( plugin )
 	{
@@ -378,32 +377,7 @@
 	}
 	else
 	{
-		switch( error )
-		{
-		case KLibLoader::ErrNoServiceFound:
-			kDebug( 14010 ) << "No service implementing the given mimetype "
-				<< "and fullfilling the given constraint expression can be found." << endl;
-			break;
-
-		case KLibLoader::ErrServiceProvidesNoLibrary:
-			kDebug( 14010 ) << "the specified service provides no shared library.";
-			break;
-
-		case KLibLoader::ErrNoLibrary:
-			kDebug( 14010 ) << "the specified library could not be loaded.";
-			break;
-
-		case KLibLoader::ErrNoFactory:
-			kDebug( 14010 ) << "the library does not export a factory for creating components.";
-			break;
-
-		case KLibLoader::ErrNoComponent:
-			kDebug( 14010 ) << "the factory does not support creating components of the specified type.";
-			break;
-		}
-
-		kDebug( 14010 ) << "Loading plugin '" << pluginId << "' failed, KLibLoader reported error: '" << endl <<
-			KLibLoader::self()->lastErrorMessage() << "'" << endl;
+		kDebug( 14010 ) << "Loading plugin " << pluginId << " failed, KServiceTypeTrader reported error: " << error ;
 	}
 
 	return plugin;
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to