From d56d0baefd53a8c7f3a9cd10fcaaeef1826e7d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 25 Oct 2016 20:56:40 +0200 Subject: converter: return a variant when the schema is a variant --- libqmenumodel/src/converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libqmenumodel') diff --git a/libqmenumodel/src/converter.cpp b/libqmenumodel/src/converter.cpp index cbf8076..ff70803 100644 --- a/libqmenumodel/src/converter.cpp +++ b/libqmenumodel/src/converter.cpp @@ -315,7 +315,7 @@ GVariant* Converter::toGVariantWithSchema(const QVariant &value, const char* sch result = g_variant_new_string(qUtf8Printable(value.toString())); } } else if (g_variant_type_equal(schema_type, G_VARIANT_TYPE_VARIANT)) { - result = Converter::toGVariant(value); + result = g_variant_new_variant(Converter::toGVariant(value)); } else if (g_variant_type_equal(schema_type, G_VARIANT_TYPE_VARDICT)) { if (value.canConvert(QVariant::Map)) { result = Converter::toGVariant(value.toMap()); -- cgit v1.2.3