X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsettings.cpp;h=2d79ffe3767bf0c269f8665fc8b5e2847e211d17;hb=e375f7a6a6de045735a897ef05bf6dcc82770ff5;hp=bb50f7f275adb9515be9a08cfe3f6baace639597;hpb=68878dc8366f2f4a0afe132847aad9a51a80cdbf;p=quassel.git diff --git a/src/common/settings.cpp b/src/common/settings.cpp index bb50f7f2..2d79ffe3 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -120,6 +120,7 @@ void Settings::setVersionMinor(const uint versionMinor) s.setValue("Config/VersionMinor", versionMinor); } + bool Settings::sync() { create_qsettings; s.sync(); @@ -131,11 +132,13 @@ bool Settings::sync() { } } + bool Settings::isWritable() { create_qsettings; return s.isWritable(); } + QStringList Settings::allLocalKeys() { create_qsettings; @@ -200,6 +203,7 @@ const QVariant &Settings::localValue(const QString &key, const QVariant &def) return cacheValue(normKey); } + bool Settings::localKeyExists(const QString &key) { QString normKey = normalizedKey(group, key); @@ -218,6 +222,10 @@ void Settings::removeLocalKey(const QString &key) s.remove(key); s.endGroup(); QString normKey = normalizedKey(group, key); - if (isCached(normKey)) + if (isCached(normKey)) { settingsCache.remove(normKey); + } + if (hasNotifier(normKey)) { + emit notifier(normKey)->valueChanged({}); + } }