From 59596449eef2dfba0da8cf7e0c6ac4fcbf3a7a1e Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 6 May 2018 14:18:05 +0900 Subject: Optimise #includes, eliminate some excess blank lines in lib/csapi --- lib/converters.h | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'lib/converters.h') diff --git a/lib/converters.h b/lib/converters.h index 68005c0d..1b70fba4 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -21,7 +21,6 @@ #include #include // Includes #include -#include #include @@ -75,18 +74,6 @@ namespace QMatrixClient return QJsonValue(bytes.constData()); } - inline QJsonObject toJson(const QVariantMap& map) - { - return QJsonObject::fromVariantMap(map); - } - -#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) - inline QJsonObject toJson(const QVariantHash& hMap) - { - return QJsonObject::fromVariantHash(hMap); - } -#endif - template inline QJsonObject toJson(const QHash& hashMap) { @@ -221,24 +208,6 @@ namespace QMatrixClient } }; - template <> struct FromJson - { - auto operator()(const QJsonValue& jv) const - { - return jv.toObject().toVariantMap(); - } - }; - -#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) - template <> struct FromJson - { - auto operator()(const QJsonValue& jv) const - { - return jv.toObject().toVariantHash(); - } - }; -#endif - template struct FromJson> { auto operator()(const QJsonValue& jv) const -- cgit v1.2.3