mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
ce2ca13815
commit
1d468ac35a
594 changed files with 16040 additions and 16536 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue