[Digikam-devel] extragear/graphics/digikam/utilities/imageeditor/canvas
Gilles Caulier
caulier.gilles at gmail.com
Sat Mar 24 21:18:11 GMT 2007
SVN commit 646179 by cgilles:
digikam from trunk : there is no Image Plugins setup now. No need to check rc config file on harddrive anymore. This will speed-up startup digiKam/showfoto
CCMAIL: digikam-devel at kde.org
M +7 -31 imagepluginloader.cpp
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/imagepluginloader.cpp #646178:646179
@@ -24,7 +24,6 @@
#include <ktrader.h>
#include <kparts/componentfactory.h>
-#include <kconfig.h>
#include <kapplication.h>
#include <klocale.h>
#include <kxmlguiclient.h>
@@ -90,40 +89,17 @@
d->splash = splash;
QStringList imagePluginsList2Load;
- KConfig* config = kapp->config();
- config->setGroup("ImageViewer Settings");
- // If digiKam have been started to the first time, there is no image plugins list
- // available ==> we load all by default.
+ KTrader::OfferList offers = KTrader::self()->query("Digikam/ImagePlugin");
+ KTrader::OfferList::ConstIterator iter;
- if ( config->readEntry("ImagePlugins List").isNull() )
+ for (iter = offers.begin() ; iter != offers.end() ; ++iter)
{
- KTrader::OfferList offers = KTrader::self()->query("Digikam/ImagePlugin");
- KTrader::OfferList::ConstIterator iter;
-
- for (iter = offers.begin() ; iter != offers.end() ; ++iter)
- {
- KService::Ptr service = *iter;
- if (!d->obsoleteImagePluginsList.contains(service->library()))
- imagePluginsList2Load.append(service->library());
- }
-
- // Create the plugins list to config file.
- config->writeEntry("ImagePlugins List", imagePluginsList2Load);
- config->sync();
+ KService::Ptr service = *iter;
+ if (!d->obsoleteImagePluginsList.contains(service->library()))
+ imagePluginsList2Load.append(service->library());
}
- else
- {
- imagePluginsList2Load = config->readListEntry("ImagePlugins List");
-
- for (QStringList::Iterator it = d->obsoleteImagePluginsList.begin();
- it != d->obsoleteImagePluginsList.end(); ++it)
- {
- if (imagePluginsList2Load.contains(*it))
- imagePluginsList2Load.remove(*it);
- }
- }
-
+
loadPluginsFromList(imagePluginsList2Load);
}
More information about the Digikam-devel
mailing list