From: Shane Synan Date: Fri, 22 Jun 2018 05:18:09 +0000 (-0500) Subject: client: Fix settings upgrade missing some steps X-Git-Tag: 0.13-rc1~21 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=ebe555951f043ac230149436fb15627120da945e client: Fix settings upgrade missing some steps Remove cache check in Settings::localKeyExists(). This fixes settings version upgrade wrongly skipping some steps due to earlier migration steps causing default values (not stored in .conf) to be loaded into settings cache. Most notably, creating/writing the QtUiStyle settings Qt StyleSheet. The symptoms are only visible when migrating multiple steps at once, hence not catching this earlier. Bug originally introduced in d2ac8f78a0e050d2efa397c434b249d6b3391576 --- diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 2d79ffe3..6273f7c7 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -207,9 +207,8 @@ const QVariant &Settings::localValue(const QString &key, const QVariant &def) bool Settings::localKeyExists(const QString &key) { QString normKey = normalizedKey(group, key); - if (isCached(normKey)) - return true; - + // Do NOT check the cache as default values get cached, too. Otherwise loading a setting once + // will mark it as existing in settings, even when it only exists in cache (and not on disk). create_qsettings; return s.contains(normKey); }