Version: 0.7.2 (using KDE KDE 3.3.2) Installed from: Gentoo Packages There are a lot of double and even quadruple appearances of menu entries in Digikam. The amount of double entries in the menu of the image editor can even change while Digikam is running. One example screenshot is attached, but there are many more places with double entries.
Created attachment 10497 [details] Screenshot screenshot of the color adjustment of the image editor.
It seems that this problem only occurs when I run DigiKam in my local language (Dutch). When switching to English, the problem is gone.
CVS commit by pahlibar: the service name is i18ned, whereas plugin name is from ascii. depending on the locale, it may or may not match. set plugin name to be local8bit version of service name. otherwise, the plugin will be loaded multiple times and appear multiple times in the menu BUG: 103147 M +9 -6 imagepluginloader.cpp 1.16 M +2 -2 imagepluginloader.h 1.7 --- kdeextragear-3/digikam/utilities/imageeditor/imagepluginloader.cpp #1.15:1.16 @@ -87,5 +87,7 @@ void ImagePluginLoader::loadPluginsFromL int error; plugin = KParts::ComponentFactory - ::createInstanceFromService<Digikam::ImagePlugin>(service, this, 0, 0, &error); + ::createInstanceFromService<Digikam::ImagePlugin>(service, this, + service->name().local8Bit(), + 0, &error); if (plugin && (dynamic_cast<KXMLGUIClient*>(plugin) != 0)) @@ -138,5 +140,7 @@ void ImagePluginLoader::loadPluginsFromL { plugin = KParts::ComponentFactory - ::createInstanceFromService<Digikam::ImagePlugin>(service, this, 0, 0); + ::createInstanceFromService<Digikam::ImagePlugin>(service, this, + service->name().local8Bit(), + 0); if (plugin) @@ -163,5 +167,5 @@ void ImagePluginLoader::loadPluginsFromL } -Digikam::ImagePlugin* ImagePluginLoader::pluginIsLoaded(QString pluginName) +Digikam::ImagePlugin* ImagePluginLoader::pluginIsLoaded(const QString& pluginName) { if( m_pluginList.isEmpty() ) return NULL; @@ -171,5 +175,5 @@ Digikam::ImagePlugin* ImagePluginLoader: for ( plugin = m_pluginList.first() ; plugin ; plugin = m_pluginList.next() ) { - if( plugin->name() == pluginName ) + if( QString::fromLocal8Bit(plugin->name()) == pluginName ) return plugin; } @@ -178,5 +182,5 @@ Digikam::ImagePlugin* ImagePluginLoader: } -bool ImagePluginLoader::pluginLibraryIsLoaded(QString libraryName) +bool ImagePluginLoader::pluginLibraryIsLoaded(const QString& libraryName) { KTrader::OfferList offers = KTrader::self()->query("Digikam/ImagePlugin"); @@ -186,5 +190,4 @@ bool ImagePluginLoader::pluginLibraryIsL { KService::Ptr service = *iter; - Digikam::ImagePlugin *plugin; if(service->library() == libraryName) --- kdeextragear-3/digikam/utilities/imageeditor/imagepluginloader.h #1.6:1.7 @@ -50,5 +50,5 @@ public: // Return true if plugin library is loaded in memory. // 'libraryName' is internal plugin library name not i18n. - bool pluginLibraryIsLoaded(QString libraryName); + bool pluginLibraryIsLoaded(const QString& libraryName); private: @@ -58,5 +58,5 @@ private: QPtrList<Digikam::ImagePlugin> m_pluginList; - Digikam::ImagePlugin* pluginIsLoaded(QString pluginName); + Digikam::ImagePlugin* pluginIsLoaded(const QString& pluginName); };
reopening. apparently its not fixed
SVN commit 411729 by pahlibar: plugin->name() is the QObject name() function and we don't have any control over it (the name is set internally by klibloader). So we need to hold the name of the service separately. instead of adding a function to the imageplugin base which will break BC, hold the names of the service in a separate list and use it to check if the plugin has already been loaded or not. this prevents plugins being loaded twice. BUGS: 103147 M +100 -98 trunk/extragear/graphics/digikam/utilities/imageeditor/imagepluginloader.cpp M +11 -6 trunk/extragear/graphics/digikam/utilities/imageeditor/imagepluginloader.h
*** Bug 105514 has been marked as a duplicate of this bug. ***
Since digiKam 5.2.0, all image editor plugins have been removed and embed as well in image editor/showfoto implementation. There is no more run-time loading of plugin libraries. Gilles Caulier