diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-05 19:04:53 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-05 19:04:53 +0300 |
commit | 91eb30f03795921b48360b79bdb739dcd0f10f17 (patch) | |
tree | 1a2fccbbbf4751cf2cf6f6418cb525dcee5f2acd /launcher/ApplicationMessage.cpp | |
parent | a3ffa6455021b69bd1940b65fefb3b6177c96730 (diff) | |
parent | ae793f6cf11658c9abc5111e82d5ba7b3e6af127 (diff) | |
download | PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.tar.gz PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.tar.bz2 PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into pack_changelog
Diffstat (limited to 'launcher/ApplicationMessage.cpp')
-rw-r--r-- | launcher/ApplicationMessage.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/launcher/ApplicationMessage.cpp b/launcher/ApplicationMessage.cpp index 700e43ce..50ac10cc 100644 --- a/launcher/ApplicationMessage.cpp +++ b/launcher/ApplicationMessage.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 @@ -39,7 +39,8 @@ #include <QJsonObject> #include "Json.h" -void ApplicationMessage::parse(const QByteArray & input) { +void ApplicationMessage::parse(const QByteArray& input) +{ auto doc = Json::requireDocument(input, "ApplicationMessage"); auto root = Json::requireObject(doc, "ApplicationMessage"); @@ -47,12 +48,13 @@ void ApplicationMessage::parse(const QByteArray & input) { args.clear(); auto parsedArgs = root.value("args").toObject(); - for(auto iter = parsedArgs.constBegin(); iter != parsedArgs.constEnd(); iter++) { + for (auto iter = parsedArgs.constBegin(); iter != parsedArgs.constEnd(); iter++) { args.insert(iter.key(), iter.value().toString()); } } -QByteArray ApplicationMessage::serialize() { +QByteArray ApplicationMessage::serialize() +{ QJsonObject root; root.insert("command", command); QJsonObject outArgs; |