aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-13 14:10:47 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-13 14:10:47 +0200
commitb8a78fe7a2370697eea4517ab000130fe1180715 (patch)
tree563b103f6b1b639e0da6fcde436a29f82f9d5fc8 /lib/converters.h
parent67ea5b45701e6bd5bf244039dc60a134d67a4cab (diff)
downloadlibquotient-b8a78fe7a2370697eea4517ab000130fe1180715.tar.gz
libquotient-b8a78fe7a2370697eea4517ab000130fe1180715.zip
Exclude code no more needed with Qt6
Diffstat (limited to 'lib/converters.h')
-rw-r--r--lib/converters.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/converters.h b/lib/converters.h
index e07b6ee4..af6c0192 100644
--- a/lib/converters.h
+++ b/lib/converters.h
@@ -221,14 +221,16 @@ template <typename T>
struct JsonConverter<std::vector<T>>
: public JsonArrayConverter<std::vector<T>> {};
+#if QT_VERSION_MAJOR < 6 // QVector is an alias of QList in Qt6 but not in Qt 5
template <typename T>
struct JsonConverter<QVector<T>> : public JsonArrayConverter<QVector<T>> {};
+#endif
template <typename T>
struct JsonConverter<QList<T>> : public JsonArrayConverter<QList<T>> {};
template <>
-struct JsonConverter<QStringList> : public JsonConverter<QList<QString>> {
+struct JsonConverter<QStringList> : public JsonArrayConverter<QStringList> {
static auto dump(const QStringList& sl)
{
return QJsonArray::fromStringList(sl);