replace homepage() with pluginInfo()
a KPluginInfo will have the homepage from the desktop file but also the other data as well such as author and description
This commit is contained in:
parent
ae120ba02d
commit
b7a079f87d
@ -73,11 +73,6 @@ QSizeF ThemeProxy::mSize(const QFont &font) const
|
||||
}
|
||||
|
||||
|
||||
KUrl ThemeProxy::homepage() const
|
||||
{
|
||||
return Plasma::Theme::defaultTheme()->homepage();
|
||||
}
|
||||
|
||||
bool ThemeProxy::useGlobalSettings() const
|
||||
{
|
||||
return Plasma::Theme::defaultTheme()->useGlobalSettings();
|
||||
|
@ -40,7 +40,6 @@ class ThemeProxy : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString themeName READ themeName NOTIFY themeChanged)
|
||||
Q_PROPERTY(KUrl homepage READ homepage NOTIFY themeChanged)
|
||||
Q_PROPERTY(bool useGlobalSettings READ useGlobalSettings NOTIFY themeChanged)
|
||||
Q_PROPERTY(QString wallpaperPath READ wallpaperPath NOTIFY themeChanged)
|
||||
|
||||
@ -97,7 +96,6 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE QSizeF mSize(const QFont &font = QApplication::font()) const;
|
||||
|
||||
KUrl homepage() const;
|
||||
bool useGlobalSettings() const;
|
||||
QString wallpaperPath() const;
|
||||
Q_INVOKABLE QString wallpaperPathForSize(int width=-1, int height=-1) const;
|
||||
|
@ -85,8 +85,8 @@ public:
|
||||
defaultWallpaperSuffix(DEFAULT_WALLPAPER_SUFFIX),
|
||||
defaultWallpaperWidth(DEFAULT_WALLPAPER_WIDTH),
|
||||
defaultWallpaperHeight(DEFAULT_WALLPAPER_HEIGHT),
|
||||
cacheSize(0),
|
||||
pixmapCache(0),
|
||||
cacheSize(0),
|
||||
cachesToDiscard(NoCache),
|
||||
locolor(false),
|
||||
compositingActive(KWindowSystem::self()->compositingActive()),
|
||||
@ -173,6 +173,7 @@ public:
|
||||
|
||||
Theme *q;
|
||||
QString themeName;
|
||||
KPluginInfo pluginInfo;
|
||||
QList<QString> fallbackThemes;
|
||||
KSharedConfigPtr colors;
|
||||
KColorScheme colorScheme;
|
||||
@ -597,6 +598,7 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
|
||||
if (realTheme) {
|
||||
const QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/metadata.desktop")));
|
||||
KConfig metadata(metadataPath);
|
||||
pluginInfo = KPluginInfo(metadataPath);
|
||||
|
||||
processWallpaperSettings(&metadata);
|
||||
|
||||
@ -997,12 +999,9 @@ void Theme::setCacheLimit(int kbytes)
|
||||
d->pixmapCache = 0;
|
||||
}
|
||||
|
||||
QUrl Theme::homepage() const
|
||||
KPluginInfo Theme::pluginInfo() const
|
||||
{
|
||||
const QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % d->themeName % QLatin1Literal("/metadata.desktop")));
|
||||
KConfig metadata(metadataPath);
|
||||
KConfigGroup brandConfig(&metadata, "Branding");
|
||||
return brandConfig.readEntry("homepage", QUrl("http://www.kde.org"));
|
||||
return d->pluginInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -304,10 +304,11 @@ class PLASMA_EXPORT Theme : public QObject
|
||||
void releaseRectsCache(const QString &image);
|
||||
|
||||
/**
|
||||
* @return the default homepage to use in conjunction with the branding svg content
|
||||
* @since 4.7
|
||||
* @return plugin info for this theme, with informations such as
|
||||
* name, description, author, website etc
|
||||
* @since 5.0
|
||||
*/
|
||||
QUrl homepage() const;
|
||||
KPluginInfo pluginInfo() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user