From 94410352f53df622a6b05fb3e651fa032725e56f Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 15 Dec 2022 07:55:28 -0800 Subject: [PATCH] Merge pull request #625 from Edgars-Cirulis/develop --- launcher/ApplicationMessage.cpp | 8 ++++---- launcher/ApplicationMessage.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/launcher/ApplicationMessage.cpp b/launcher/ApplicationMessage.cpp index ca276b89c..700e43ced 100644 --- a/launcher/ApplicationMessage.cpp +++ b/launcher/ApplicationMessage.cpp @@ -47,8 +47,8 @@ void ApplicationMessage::parse(const QByteArray & input) { args.clear(); auto parsedArgs = root.value("args").toObject(); - for(auto iter = parsedArgs.begin(); iter != parsedArgs.end(); iter++) { - args[iter.key()] = iter.value().toString(); + for(auto iter = parsedArgs.constBegin(); iter != parsedArgs.constEnd(); iter++) { + args.insert(iter.key(), iter.value().toString()); } } @@ -56,8 +56,8 @@ QByteArray ApplicationMessage::serialize() { QJsonObject root; root.insert("command", command); QJsonObject outArgs; - for (auto iter = args.begin(); iter != args.end(); iter++) { - outArgs[iter.key()] = iter.value(); + for (auto iter = args.constBegin(); iter != args.constEnd(); iter++) { + outArgs.insert(iter.key(), iter.value()); } root.insert("args", outArgs); diff --git a/launcher/ApplicationMessage.h b/launcher/ApplicationMessage.h index 745bdeadc..d66456ebd 100644 --- a/launcher/ApplicationMessage.h +++ b/launcher/ApplicationMessage.h @@ -1,12 +1,12 @@ #pragma once #include -#include +#include #include struct ApplicationMessage { QString command; - QMap args; + QHash args; QByteArray serialize(); void parse(const QByteArray & input);