aboutsummaryrefslogtreecommitdiff
path: root/lib/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/settings.cpp')
-rw-r--r--lib/settings.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/settings.cpp b/lib/settings.cpp
index 9c61ab5e..3bf61605 100644
--- a/lib/settings.cpp
+++ b/lib/settings.cpp
@@ -18,12 +18,18 @@ void Settings::setLegacyNames(const QString& organizationName,
void Settings::setValue(const QString& key, const QVariant& value)
{
- // qCDebug() << "Setting" << key << "to" << value;
QSettings::setValue(key, value);
if (legacySettings.contains(key))
legacySettings.remove(key);
}
+void Settings::remove(const QString& key)
+{
+ QSettings::remove(key);
+ if (legacySettings.contains(key))
+ legacySettings.remove(key);
+}
+
QVariant Settings::value(const QString& key, const QVariant& defaultValue) const
{
auto value = QSettings::value(key, legacySettings.value(key, defaultValue));