the properties don't get updated when the key value changes
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.
import GSettings 1.0
MainView {
width: 300
height: 450
GSettings {
id: desk
schema.id: "org.gnome.
}
ListItem.
text: "You can see icons!"
visible: desk.showDeskto
}
}"
Doing
" property bool showTheIcons: desk.showDeskto
GSettings {
id: desk
schema.id: "org.gnome.
onChanged: { if (key == "showDesktopIcons") showTheIcons = value }
}
ListItem.
text: "You can see icons!"
visible: showTheIcons
}"
works though (e.g using a property)
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Sebastien Bacher (community): Approve
-
Diff: 52 lines (+9/-1)2 files modifiedGSettings/gsettings-qml.cpp (+3/-1)
tests/tst_GSettings.qml (+6/-0)
Changed in gsettings-qt: | |
status: | Fix Committed → Fix Released |
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.