- if (value) {
- _line_edit->setText(QString(
- g_variant_get_string(value, NULL)));
- g_variant_unref(value);
- }
+ if (!value)
+ return NULL;
+
+ _line_edit = new QLineEdit(parent);
+ _line_edit->setText(QString::fromUtf8(
+ g_variant_get_string(value, NULL)));
+ g_variant_unref(value);