diff options
Diffstat (limited to 'lib/converters.h')
-rw-r--r-- | lib/converters.h | 31 |
1 files changed, 0 insertions, 31 deletions
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 <QtCore/QJsonObject> #include <QtCore/QJsonArray> // Includes <QtCore/QJsonValue> #include <QtCore/QDate> -#include <QtCore/QVariant> #include <unordered_map> @@ -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 <typename T> inline QJsonObject toJson(const QHash<QString, T>& hashMap) { @@ -221,24 +208,6 @@ namespace QMatrixClient } }; - template <> struct FromJson<QVariantMap> - { - auto operator()(const QJsonValue& jv) const - { - return jv.toObject().toVariantMap(); - } - }; - -#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) - template <> struct FromJson<QVariantHash> - { - auto operator()(const QJsonValue& jv) const - { - return jv.toObject().toVariantHash(); - } - }; -#endif - template <typename T> struct FromJson<QHash<QString, T>> { auto operator()(const QJsonValue& jv) const |