From c94dc1104e1eb5e0537fcd9429626988524c8a98 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 21 Jul 2020 11:31:06 +0200 Subject: converters.*: clean away old cruft --- lib/converters.h | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'lib/converters.h') diff --git a/lib/converters.h b/lib/converters.h index 075af7ef..543e9496 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -30,21 +30,6 @@ #include -#if QT_VERSION < QT_VERSION_CHECK(5,14,0) -// Enable std::unordered_map -// REMOVEME in favor of UnorderedMap, once we regenerate API files -namespace std { -template <> -struct hash { - size_t operator()(const QString& s) const Q_DECL_NOEXCEPT - { - return qHash(s, uint(qGlobalQHashSeed()) - ); - } -}; -} // namespace std -#endif - class QVariant; namespace Quotient { @@ -296,18 +281,9 @@ template struct JsonObjectConverter> : public HashMapFromJson> {}; -// We could use std::conditional<> below but QT_VERSION* macros in C++ code -// cause (kinda valid but useless and noisy) compiler warnings about -// bitwise operations on signed integers; so use the preprocessor for now. -using variant_map_t = -#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) - QVariantHash; -#else - QVariantMap; -#endif template <> -struct JsonConverter { - static QJsonObject dump(const variant_map_t& vh); +struct JsonConverter { + static QJsonObject dump(const QVariantHash& vh); static QVariantHash load(const QJsonValue& jv); }; -- cgit v1.2.3