Qt: prepare for removal of deprecated GUI settings

If you remove a custom name and already had a deprecated name before, you'll never get rid of it.
This applies to all of the deprecated settings.
This commit is contained in:
Megamouse
2021-03-22 21:08:29 +01:00
parent b518a9a338
commit 6892cb1c7e
5 changed files with 16 additions and 4 deletions
+7 -2
View File
@@ -39,9 +39,9 @@ void settings::RemoveValue(const QString& key, const QString& name)
}
}
QVariant settings::GetValue(const gui_save& entry) const
void settings::RemoveValue(const gui_save& entry)
{
return m_settings ? m_settings->value(entry.key + "/" + entry.name, entry.def) : entry.def;
RemoveValue(entry.key, entry.name);
}
QVariant settings::GetValue(const QString& key, const QString& name, const QVariant& def) const
@@ -49,6 +49,11 @@ QVariant settings::GetValue(const QString& key, const QString& name, const QVari
return m_settings ? m_settings->value(key + "/" + name, def) : def;
}
QVariant settings::GetValue(const gui_save& entry) const
{
return GetValue(entry.key, entry.name, entry.def);
}
QVariant settings::List2Var(const q_pair_list& list)
{
QByteArray ba;