diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-04-29 18:05:48 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-04-29 19:55:24 -0700 |
commit | 788fa40c2ae0e9786c070f4593a4e7ff6efc77d3 (patch) | |
tree | 3eb86f6640005a4e4a54d7623518f0f9a8a181bf /launcher/BaseInstance.cpp | |
parent | 0ce30495796627e7591587ca1e977be98178f225 (diff) | |
download | PrismLauncher-788fa40c2ae0e9786c070f4593a4e7ff6efc77d3.tar.gz PrismLauncher-788fa40c2ae0e9786c070f4593a4e7ff6efc77d3.tar.bz2 PrismLauncher-788fa40c2ae0e9786c070f4593a4e7ff6efc77d3.zip |
refactor: Move ini to use QSettings && drop get/setList functions
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/BaseInstance.cpp')
-rw-r--r-- | launcher/BaseInstance.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/launcher/BaseInstance.cpp b/launcher/BaseInstance.cpp index ad45aa2d..a8fce879 100644 --- a/launcher/BaseInstance.cpp +++ b/launcher/BaseInstance.cpp @@ -188,25 +188,25 @@ bool BaseInstance::shouldStopOnConsoleOverflow() const QStringList BaseInstance::getLinkedInstances() const { - return m_settings->getList<QString>("linkedInstances"); + return m_settings->get("linkedInstances").toStringList(); } void BaseInstance::setLinkedInstances(const QStringList& list) { - auto linkedInstances = m_settings->getList<QString>("linkedInstances"); - m_settings->setList("linkedInstances", list); + auto linkedInstances = m_settings->get("linkedInstances").toStringList(); + m_settings->set("linkedInstances", list); } void BaseInstance::addLinkedInstanceId(const QString& id) { - auto linkedInstances = m_settings->getList<QString>("linkedInstances"); + auto linkedInstances = m_settings->get("linkedInstances").toStringList(); linkedInstances.append(id); setLinkedInstances(linkedInstances); } bool BaseInstance::removeLinkedInstanceId(const QString& id) { - auto linkedInstances = m_settings->getList<QString>("linkedInstances"); + auto linkedInstances = m_settings->get("linkedInstances").toStringList(); int numRemoved = linkedInstances.removeAll(id); setLinkedInstances(linkedInstances); return numRemoved > 0; @@ -214,7 +214,7 @@ bool BaseInstance::removeLinkedInstanceId(const QString& id) bool BaseInstance::isLinkedToInstanceId(const QString& id) const { - auto linkedInstances = m_settings->getList<QString>("linkedInstances"); + auto linkedInstances = m_settings->get("linkedInstances").toStringList(); return linkedInstances.contains(id); } |