mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-30 10:29:59 +03:00
refactor: Move ini to use QSettings && drop get/setList functions
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
0ce3049579
commit
788fa40c2a
12 changed files with 220 additions and 251 deletions
|
|
@ -121,19 +121,6 @@ bool SettingsObject::contains(const QString &id)
|
|||
return m_settings.contains(id);
|
||||
}
|
||||
|
||||
bool SettingsObject::setList(const QString &id, QVariantList value)
|
||||
{
|
||||
QString stringList = QJsonDocument(QVariant(value).toJsonArray()).toJson(QJsonDocument::Compact);
|
||||
|
||||
return set(id, stringList);
|
||||
}
|
||||
|
||||
QVariantList SettingsObject::getList(const QString &id)
|
||||
{
|
||||
QVariant value = this->get(id);
|
||||
return QJsonDocument::fromJson(value.toByteArray()).toVariant().toList();
|
||||
}
|
||||
|
||||
bool SettingsObject::reload()
|
||||
{
|
||||
for (auto setting : m_settings.values())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue