diff --git a/theme.cpp b/theme.cpp index 78e721755..5fdce4655 100644 --- a/theme.cpp +++ b/theme.cpp @@ -1037,6 +1037,14 @@ void Theme::setCacheLimit(int kbytes) } } +KUrl Theme::homepage() const +{ + const QString metadataPath(KStandardDirs::locate("data", QLatin1Literal("desktoptheme/") % d->themeName % QLatin1Literal("/metadata.desktop"))); + KConfig metadata(metadataPath); + KConfigGroup brandConfig(&metadata, "Branding"); + return brandConfig.readEntry("homepage", KUrl("http://www.kde.org")); +} + } #include diff --git a/theme.h b/theme.h index 8e7e2d515..81234bc68 100644 --- a/theme.h +++ b/theme.h @@ -372,6 +372,12 @@ 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 + */ + KUrl homepage() const; + Q_SIGNALS: /** * Emitted when the user changes the theme. SVGs should be reloaded at