@@ -243,28 +243,13 @@ void HudClient::modelReady(bool needDisconnect)
246−static QVariant QVariantFromGVariant(GVariant *value)
248− // Only handle the cases we care for now
249− switch (g_variant_classify(value)) {
250− case G_VARIANT_CLASS_BOOLEAN:
251− return QVariant((bool) g_variant_get_boolean(value));
252− case G_VARIANT_CLASS_DOUBLE:
253− return QVariant(g_variant_get_double(value));
254− case G_VARIANT_CLASS_STRING:
255− return QVariant(QString::fromUtf8(g_variant_get_string(value, NULL)));
261static void addAttribute(QVariantMap &properties, GMenuModel *menuModel, int item, const char *attribute) {
246static void addAttribute(QVariantMap &properties, GMenuModel *menuModel, int item, const char *attribute) {
262 GVariant *v = g_menu_model_get_item_attribute_value(menuModel, item, attribute, NULL);
247 GVariant *v = g_menu_model_get_item_attribute_value(menuModel, item, attribute, NULL);
264 if (v == NULL)
249 if (v == NULL)
267− properties.insert(attribute, QVariantFromGVariant(v));
252+ properties.insert(attribute, DeeListModel::VariantForData(v));
268 g_variant_unref(v);
253 g_variant_unref(v);