FEATURE: formalize how the homepage for branding purposes is gotten at via the theme.
(this has been a TODO in the code since 4.2!) svn path=/trunk/KDE/kdelibs/; revision=1209505
This commit is contained in:
parent
b221146758
commit
f41ce1601b
@ -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 <theme.moc>
|
||||
|
6
theme.h
6
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user