From dd45181f4adf55d383d26dd6db42b766fe387ce5 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sat, 21 Nov 2015 11:32:34 +1100 Subject: [PATCH] Merge https://github.com/gpodder/libmygpo-qt/pull/9 --- 3rdparty/libmygpo-qt/qjsonwrapper/Json.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/3rdparty/libmygpo-qt/qjsonwrapper/Json.cpp b/3rdparty/libmygpo-qt/qjsonwrapper/Json.cpp index 4a8c2ac36..1b4a79065 100644 --- a/3rdparty/libmygpo-qt/qjsonwrapper/Json.cpp +++ b/3rdparty/libmygpo-qt/qjsonwrapper/Json.cpp @@ -116,7 +116,12 @@ toJson( const QVariant &variant, bool* ok ) return doc.toJson( QJsonDocument::Compact ); #else QJson::Serializer serializer; - return serializer.serialize( variant, ok ); + QByteArray ret = serializer.serialize(variant); + if ( ok != NULL ) + { + *ok = !ret.isNull(); + } + return ret; #endif }