the properties don't get updated when the key value changes

Bug #1206181 reported by Sebastien Bacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gsettings-qt
Fix Released
High
Lars Karlitski
gsettings-qt (Ubuntu)
Fix Released
High
Unassigned

Bug Description

If you bind a qml property to a key, the property doesn't get correctly updated when the key is changed

Example:

"import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
import GSettings 1.0

MainView {
    width: 300
    height: 450
    GSettings {
        id: desk
        schema.id: "org.gnome.desktop.background"
    }
    ListItem.Standard {
        text: "You can see icons!"
        visible: desk.showDesktopIcons
    }
}"

Doing

" property bool showTheIcons: desk.showDesktopIcons
    GSettings {
        id: desk
        schema.id: "org.gnome.desktop.background"
        onChanged: { if (key == "showDesktopIcons") showTheIcons = value }
    }
    ListItem.Standard {
        text: "You can see icons!"
        visible: showTheIcons
    }"

works though (e.g using a property)

Related branches

Revision history for this message
Lars Karlitski (larsu) wrote :

I introduced this regression when I split the C++ API from the qml object. Sorry about that.

The attached branch fixes the issue and adds a test case.

Changed in gsettings-qt:
assignee: nobody → Lars Uebernickel (larsu)
importance: Undecided → High
status: New → In Progress
Changed in gsettings-qt (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:gsettings-qt at revision 30, scheduled for release in gsettings-qt, milestone Unknown

Changed in gsettings-qt:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gsettings-qt - 0.0+13.10.20130730-0ubuntu1

---------------
gsettings-qt (0.0+13.10.20130730-0ubuntu1) saucy; urgency=low

  [ Lars Uebernickel ]
  * Fix regression: GSettingsQml didn't update values on change. (LP:
    #1206181)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 30
 -- Ubuntu daily release <email address hidden> Tue, 30 Jul 2013 07:01:52 +0000

Changed in gsettings-qt (Ubuntu):
status: Triaged → Fix Released
Lars Karlitski (larsu)
Changed in gsettings-qt:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.