diff options
Diffstat (limited to 'logic/Json.h')
-rw-r--r-- | logic/Json.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/logic/Json.h b/logic/Json.h index d13230b8..cb266c6e 100644 --- a/logic/Json.h +++ b/logic/Json.h @@ -48,33 +48,6 @@ MULTIMC_LOGIC_EXPORT QJsonArray requireArray(const QJsonDocument &doc, const QSt void writeString(QJsonObject & to, const QString &key, const QString &value); void writeStringList(QJsonObject & to, const QString &key, const QStringList &values); -template <typename T> -void writeObjectList(QJsonObject & to, QString key, QList<std::shared_ptr<T>> values) -{ - if (!values.isEmpty()) - { - QJsonArray array; - for (auto value: values) - { - array.append(value->toJson()); - } - to.insert(key, array); - } -} -template <typename T> -void writeObjectList(QJsonObject & to, QString key, QList<T> values) -{ - if (!values.isEmpty()) - { - QJsonArray array; - for (auto value: values) - { - array.append(value.toJson()); - } - to.insert(key, array); - } -} - template<typename T> QJsonValue toJson(const T &t) { |