- if (value) {
- _check_box->setCheckState(g_variant_get_boolean(value) ?
- Qt::Checked : Qt::Unchecked);
- g_variant_unref(value);
- }
+ _check_box = new QCheckBox(name(), parent);
+ _check_box->setCheckState(g_variant_get_boolean(value) ?
+ Qt::Checked : Qt::Unchecked);
+ g_variant_unref(value);