aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src
diff options
context:
space:
mode:
Diffstat (limited to 'libqmenumodel/src')
-rw-r--r--libqmenumodel/src/converter.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libqmenumodel/src/converter.cpp b/libqmenumodel/src/converter.cpp
index ff70803..459e77f 100644
--- a/libqmenumodel/src/converter.cpp
+++ b/libqmenumodel/src/converter.cpp
@@ -69,10 +69,7 @@ QVariant Converter::toQVariant(GVariant *value)
result.setValue(list);
g_free(sa);
} else if (g_variant_type_equal(type, G_VARIANT_TYPE_BYTESTRING)) {
- gsize size = 0;
- gchar *bs = g_variant_dup_bytestring(value, &size);
- result.setValue(QByteArray::fromRawData(bs, size));
- g_free(bs);
+ result.setValue(QByteArray(g_variant_get_bytestring(value)));
} else if (g_variant_type_equal(type, G_VARIANT_TYPE_BYTESTRING_ARRAY)) {
gsize size = 0;
const gchar **bsa = g_variant_get_bytestring_array(value, &size);