on xenial help sign in
Dash: Make assignments bindings

This way if the model changes the item value also changes. Approved by PS Jenkins bot, Pawel Stolowski, Michael Zanetti.

commit56827d4284fed15a77e6d66eeaec55e2ddf2ab4a authorAlbert Astals <albert.astals@canonical.com> dateThu 5 Sep 2013, 18:20 (13 years ago) parent58a96513004fcc
1 file changed+4−4
Dash/GenericScopeView.qml+4−4
Dash/GenericScopeView.qml+4−4
@@ -74,12 +74,12 @@ ScopeView {
7474 onLoaded: {
7575 if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
7676 // TODO: the running apps grid doesn't support standard scope results model yet
77− item.firstModel = results.firstModel
78− item.secondModel = results.secondModel
77+ item.firstModel = Qt.binding(function() { return results.firstModel })
78+ item.secondModel = Qt.binding(function() { return results.secondModel })
7979 } else {
80− item.model = results
80+ item.model = Qt.binding(function() { return results })
8181 }
82− item.objectName = categoryId
82+ item.objectName = Qt.binding(function() { return categoryId })
8383 if (item.expandable) {
8484 var shouldFilter = index != categoryView.expandedIndex;
8585 if (shouldFilter != item.filter) {