aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-06 14:18:05 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-06 14:18:05 +0900
commit59596449eef2dfba0da8cf7e0c6ac4fcbf3a7a1e (patch)
treeea28b879ecada9f002d9d7e475652089f5bb0a4e /lib/converters.h
parent1dc3784d5a3ef05433bc42318b896ff2a4e149cf (diff)
downloadlibquotient-59596449eef2dfba0da8cf7e0c6ac4fcbf3a7a1e.tar.gz
libquotient-59596449eef2dfba0da8cf7e0c6ac4fcbf3a7a1e.zip
Optimise #includes, eliminate some excess blank lines in lib/csapi
Diffstat (limited to 'lib/converters.h')
-rw-r--r--lib/converters.h31
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