projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Notify if key was removed from settings
[quassel.git]
/
src
/
common
/
settings.cpp
diff --git
a/src/common/settings.cpp
b/src/common/settings.cpp
index
bb50f7f
..
2d79ffe
100644
(file)
--- 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);
}
s.setValue("Config/VersionMinor", versionMinor);
}
+
bool Settings::sync() {
create_qsettings;
s.sync();
bool Settings::sync() {
create_qsettings;
s.sync();
@@
-131,11
+132,13
@@
bool Settings::sync() {
}
}
}
}
+
bool Settings::isWritable() {
create_qsettings;
return s.isWritable();
}
bool Settings::isWritable() {
create_qsettings;
return s.isWritable();
}
+
QStringList Settings::allLocalKeys()
{
create_qsettings;
QStringList Settings::allLocalKeys()
{
create_qsettings;
@@
-200,6
+203,7
@@
const QVariant &Settings::localValue(const QString &key, const QVariant &def)
return cacheValue(normKey);
}
return cacheValue(normKey);
}
+
bool Settings::localKeyExists(const QString &key)
{
QString normKey = normalizedKey(group, key);
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);
s.remove(key);
s.endGroup();
QString normKey = normalizedKey(group, key);
- if (isCached(normKey))
+ if (isCached(normKey))
{
settingsCache.remove(normKey);
settingsCache.remove(normKey);
+ }
+ if (hasNotifier(normKey)) {
+ emit notifier(normKey)->valueChanged({});
+ }
}
}