diff options
author | Tayou <31988415+TayouVR@users.noreply.github.com> | 2023-08-07 10:32:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 10:32:38 +0200 |
commit | 9afa7cc91fd889b146c609c6a59f7f7b3d995d9f (patch) | |
tree | 20ef3bd30beedca4995875485e468ee323d52096 /launcher/minecraft/Rule.cpp | |
parent | b572f75dbaad61cf305f1fd4f60ba94d74bfa3fa (diff) | |
parent | 75c7df46a7022a46d447bb96fbde619e5d65db05 (diff) | |
download | PrismLauncher-9afa7cc91fd889b146c609c6a59f7f7b3d995d9f.tar.gz PrismLauncher-9afa7cc91fd889b146c609c6a59f7f7b3d995d9f.tar.bz2 PrismLauncher-9afa7cc91fd889b146c609c6a59f7f7b3d995d9f.zip |
Merge branch 'develop' into icon-indexing
Signed-off-by: Tayou <31988415+TayouVR@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/Rule.cpp')
-rw-r--r-- | launcher/minecraft/Rule.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/launcher/minecraft/Rule.cpp b/launcher/minecraft/Rule.cpp index ff3d75f2..d80aab84 100644 --- a/launcher/minecraft/Rule.cpp +++ b/launcher/minecraft/Rule.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> * * This program is free software: you can redistribute it and/or modify @@ -33,8 +33,8 @@ * limitations under the License. */ -#include <QJsonObject> #include <QJsonArray> +#include <QJsonObject> #include "Rule.h" @@ -47,7 +47,7 @@ RuleAction RuleAction_fromString(QString name) return Defer; } -QList<std::shared_ptr<Rule>> rulesFromJsonV4(const QJsonObject &objectWithRules) +QList<std::shared_ptr<Rule>> rulesFromJsonV4(const QJsonObject& objectWithRules) { QList<std::shared_ptr<Rule>> rules; auto rulesVal = objectWithRules.value("rules"); @@ -55,8 +55,7 @@ QList<std::shared_ptr<Rule>> rulesFromJsonV4(const QJsonObject &objectWithRules) return rules; QJsonArray ruleList = rulesVal.toArray(); - for (auto ruleVal : ruleList) - { + for (auto ruleVal : ruleList) { std::shared_ptr<Rule> rule; if (!ruleVal.isObject()) continue; @@ -69,8 +68,7 @@ QList<std::shared_ptr<Rule>> rulesFromJsonV4(const QJsonObject &objectWithRules) continue; auto osVal = ruleObj.value("os"); - if (!osVal.isObject()) - { + if (!osVal.isObject()) { // add a new implicit action rule rules.append(ImplicitRule::create(action)); continue; @@ -102,12 +100,10 @@ QJsonObject OsRule::toJson() QJsonObject osObj; { osObj.insert("name", m_system); - if(!m_version_regexp.isEmpty()) - { + if (!m_version_regexp.isEmpty()) { osObj.insert("version", m_version_regexp); } } ruleObj.insert("os", osObj); return ruleObj; } - |