Use QStandardPaths in KConfig ctor call in Aurorae
This commit is contained in:
parent
f924be909b
commit
1e69ac6866
2 changed files with 4 additions and 3 deletions
|
@ -82,7 +82,7 @@ void AuroraeFactory::initAurorae(KConfig &conf, KConfigGroup &group)
|
|||
initQML(group);
|
||||
return;
|
||||
}
|
||||
KConfig config(QStringLiteral("aurorae/themes/") + themeName + QStringLiteral("/") + themeName + QStringLiteral("rc"), KConfig::FullConfig, "data");
|
||||
KConfig config(QStringLiteral("aurorae/themes/") + themeName + QStringLiteral("/") + themeName + QStringLiteral("rc"), KConfig::FullConfig, QStandardPaths::DataLocation);
|
||||
KConfigGroup themeGroup(&conf, themeName);
|
||||
m_theme->loadTheme(themeName, config);
|
||||
m_theme->setBorderSize((KDecorationDefines::BorderSize)themeGroup.readEntry<int>("BorderSize", KDecorationDefines::BorderNormal));
|
||||
|
@ -168,7 +168,7 @@ bool AuroraeFactory::reset(unsigned long changed)
|
|||
const KConfig conf(QStringLiteral("auroraerc"));
|
||||
const KConfigGroup group(&conf, "Engine");
|
||||
const QString themeName = group.readEntry("ThemeName", "example-deco");
|
||||
const KConfig config(QStringLiteral("aurorae/themes/") + themeName + QStringLiteral("/") + themeName + QStringLiteral("rc"), KConfig::FullConfig, "data");
|
||||
const KConfig config(QStringLiteral("aurorae/themes/") + themeName + QStringLiteral("/") + themeName + QStringLiteral("rc"), KConfig::FullConfig, QStandardPaths::DataLocation);
|
||||
const KConfigGroup themeGroup(&conf, themeName);
|
||||
if (themeName != m_themeName) {
|
||||
m_engine->clearComponentCache();
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "themeconfig.h"
|
||||
// Qt
|
||||
#include <QHash>
|
||||
#include <QStandardPaths>
|
||||
// KDE
|
||||
#include <KDE/KConfig>
|
||||
#include <KDE/KConfigGroup>
|
||||
|
@ -101,7 +102,7 @@ bool AuroraeTheme::isValid() const
|
|||
void AuroraeTheme::loadTheme(const QString &name)
|
||||
{
|
||||
KConfig conf(QStringLiteral("auroraerc"));
|
||||
KConfig config(QStringLiteral("aurorae/themes/") + name + QStringLiteral("/") + name + QStringLiteral("rc"), KConfig::FullConfig, "data");
|
||||
KConfig config(QStringLiteral("aurorae/themes/") + name + QStringLiteral("/") + name + QStringLiteral("rc"), KConfig::FullConfig, QStandardPaths::DataLocation);
|
||||
KConfigGroup themeGroup(&conf, name);
|
||||
loadTheme(name, config);
|
||||
setBorderSize((KDecorationDefines::BorderSize)themeGroup.readEntry<int>("BorderSize", KDecorationDefines::BorderNormal));
|
||||
|
|
Loading…
Reference in a new issue