aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-07-21 11:31:06 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-07-21 11:31:06 +0200
commitc94dc1104e1eb5e0537fcd9429626988524c8a98 (patch)
tree7737c6f74985b254f7320a170ef14cda447e9f11 /lib/converters.cpp
parent8da4918aa10340ef52177977a8bcad489419f8e2 (diff)
downloadlibquotient-c94dc1104e1eb5e0537fcd9429626988524c8a98.tar.gz
libquotient-c94dc1104e1eb5e0537fcd9429626988524c8a98.zip
converters.*: clean away old cruft
Diffstat (limited to 'lib/converters.cpp')
-rw-r--r--lib/converters.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/converters.cpp b/lib/converters.cpp
index 9f4b9360..e5236bb9 100644
--- a/lib/converters.cpp
+++ b/lib/converters.cpp
@@ -32,24 +32,12 @@ QVariant JsonConverter<QVariant>::load(const QJsonValue& jv)
return jv.toVariant();
}
-QJsonObject JsonConverter<variant_map_t>::dump(const variant_map_t& map)
+QJsonObject JsonConverter<QVariantHash>::dump(const QVariantHash& map)
{
- return
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
- QJsonObject::fromVariantHash
-#else
- QJsonObject::fromVariantMap
-#endif
- (map);
+ return QJsonObject::fromVariantHash(map);
}
-variant_map_t JsonConverter<QVariantHash>::load(const QJsonValue& jv)
+QVariantHash JsonConverter<QVariantHash>::load(const QJsonValue& jv)
{
- return jv.toObject().
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
- toVariantHash
-#else
- toVariantMap
-#endif
- ();
+ return jv.toObject().toVariantHash();
}