| 17 | } |
| 18 | |
| 19 | QByteArray ApplicationMessage::serialize() { |
| 20 | QJsonObject root; |
| 21 | root.insert("command", command); |
| 22 | QJsonObject outArgs; |
| 23 | for (auto iter = args.begin(); iter != args.end(); iter++) { |
| 24 | outArgs[iter.key()] = iter.value(); |
| 25 | } |
| 26 | root.insert("args", outArgs); |
| 27 | |
| 28 | QJsonDocument out; |
| 29 | out.setObject(root); |
| 30 | return out.toBinaryData(); |
| 31 | } |
no test coverage detected