From 7355e2f801eb85e771a6c454c77f9eb62398f38b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 8 Nov 2020 18:53:37 +0100 Subject: converters.h: add QUrl support --- lib/converters.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/converters.h') diff --git a/lib/converters.h b/lib/converters.h index 543e9496..81d7b6d8 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -165,6 +165,14 @@ struct JsonConverter { } }; +template <> +struct JsonConverter : JsonConverter { + static auto dump(const QUrl& url) // Override on top of that for QString + { + return JsonConverter::dump(url.toString(QUrl::FullyEncoded)); + } +}; + template <> struct JsonConverter : public TrivialJsonDumper { static auto load(const QJsonValue& jv) { return jv.toArray(); } -- cgit v1.2.3