aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.cpp
diff options
context:
space:
mode:
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();
}