[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/libs/plasma/appletbrowser
From: Alex Merry <huntedhacker () tiscali ! co ! uk>
Date: 2008-01-07 12:50:17
Message-ID: 1199710217.555299.23308.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 758257 by alexmerry:
Bye, bye, deprecated KLibLoader usage.
M +16 -18 plasmaappletitemmodel.cpp
--- trunk/KDE/kdebase/workspace/libs/plasma/appletbrowser/plasmaappletitemmodel.cpp \
#758256:758257 @@ -249,30 +249,28 @@
// Load the Plugin as library to get access
// to installedThemes() in skapplet
- KLibrary *lib = KLibLoader::self()->library(libName);
- if (lib) {
- installedThemes loadThemes = 0;
+ KLibrary lib(libName);
+ installedThemes loadThemes = 0;
- loadThemes = (installedThemes)lib->resolveFunction("installedThemes");
+ loadThemes = (installedThemes)lib.resolveFunction("installedThemes");
- if (loadThemes) {
- // loadThemes() returns the name, description, the icon
- // and one argument (file path) from the theme
- QList<QMap<QString, QVariant> > themeMetadata = loadThemes();
+ if (loadThemes) {
+ // loadThemes() returns the name, description, the icon
+ // and one argument (file path) from the theme
+ QList<QMap<QString, QVariant> > themeMetadata = loadThemes();
- QMap <QString, QVariant> metadata;
- foreach (metadata, themeMetadata) {
- metadata.insert("pluginName", "skapplet");
- metadata.insert("category", "SuperKaramba");
+ QMap <QString, QVariant> metadata;
+ foreach (metadata, themeMetadata) {
+ metadata.insert("pluginName", "skapplet");
+ metadata.insert("category", "SuperKaramba");
- QString favorite = info.pluginName() + " - " + \
qvariant_cast<QVariantList>(metadata["arguments"])[0].toString(); + \
QString favorite = info.pluginName() + " - " + \
qvariant_cast<QVariantList>(metadata["arguments"])[0].toString();
- appendRow(new PlasmaAppletItem(this, metadata,
- ((m_favorites.contains(favorite)) ? PlasmaAppletItem::Favorite : \
PlasmaAppletItem::NoFilter) |
- ((m_used.contains(info.pluginName())) ? PlasmaAppletItem::Used : \
PlasmaAppletItem::NoFilter)));
- }
+ appendRow(new PlasmaAppletItem(this, metadata,
+ ((m_favorites.contains(favorite)) ? PlasmaAppletItem::Favorite \
: PlasmaAppletItem::NoFilter) | + \
((m_used.contains(info.pluginName())) ? PlasmaAppletItem::Used : \
PlasmaAppletItem::NoFilter))); }
} else {
- kWarning() << "Could not load" << libName;
+ kWarning() << "Could not load" << libName << "; KLibrary said:" << \
lib.errorString(); }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic