Merge branch 'Plasma/5.3'

remotes/origin/Plasma/5.4
Martin Gräßlin 11 years ago
commit 25b937d6cf
  1. 9
      decorations/decorationpalette.cpp

@ -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);

Loading…
Cancel
Save