Merge branch 'Plasma/5.3'

icc-effect-5.14.5
Martin Gräßlin 2015-04-22 12:32:34 +02:00
commit 25b937d6cf
1 changed files with 9 additions and 0 deletions

View File

@ -41,6 +41,15 @@ DecorationPalette::DecorationPalette(const QString &colorScheme)
? colorScheme
: QStandardPaths::locate(QStandardPaths::GenericConfigLocation, colorScheme))
{
if (m_colorScheme.isEmpty() && colorScheme == QStringLiteral("kdeglobals")) {
// kdeglobals doesn't exist so create it. This is needed to monitor it using QFileSystemWatcher.
auto config = KSharedConfig::openConfig(colorScheme, KConfig::SimpleConfig);
KConfigGroup wmConfig(config, QStringLiteral("WM"));
wmConfig.writeEntry("FakeEntryToKeepThisGroup", true);
config->sync();
m_colorScheme = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, colorScheme);
}
m_watcher.addPath(m_colorScheme);
connect(&m_watcher, &QFileSystemWatcher::fileChanged, [this]() {
m_watcher.addPath(m_colorScheme);