[Kde-imaging] kdeextragear-libs-1/libkipi/libkipi

Renchi Raju renchi at pooh.tam.uiuc.edu
Tue Sep 21 17:37:19 CEST 2004


CVS commit by pahlibar: 


more verbose output if plugin cannot be loaded to diagnose why a plugin
is not being loaded.
CCMAIL: kde-imaging at kde.org


  M +13 -3     pluginloader.cpp   1.15


--- kdeextragear-libs-1/libkipi/libkipi/pluginloader.cpp  #1.14:1.15
@@ -261,12 +261,22 @@ void PluginLoader::loadPlugin( Info* inf
     if ( info->plugin() == 0 && info->shouldLoad() ) {
         Plugin *plugin = 0;
+        int error;
         plugin =  KParts::ComponentFactory
-                  ::createInstanceFromLibrary<Plugin>(info->library().local8Bit().data(), d->m_interface );
+                  ::createInstanceFromLibrary<Plugin>(info->library().local8Bit().data(),
+                                                      d->m_interface, 0, QStringList(), &error);
 
         if (plugin)
             kdDebug( 51001 ) << "KIPI::PluginLoader: Loaded plugin " << plugin->name()<< endl;
         else
-            kdWarning( 51001 ) << "KIPI::PluginLoader:: createInstanceFromLibrary returned 0 for " << info->name()
-                               << "(" << info->library() << ")" << endl;
+        {
+            kdWarning( 51001 ) << "KIPI::PluginLoader:: createInstanceFromLibrary returned 0 for "
+                               << info->name()
+                               << " (" << info->library() << ")"
+                               << " with error number "
+                               << error << endl;
+            if (error == KParts::ComponentFactory::ErrNoLibrary)
+                kdWarning( 51001 ) << "KLibLoader says: "
+                                   << KLibLoader::self()->lastErrorMessage() << endl;
+        }
         info->setPlugin(plugin);
     }




More information about the Kde-imaging mailing list