on xenial help sign in
Add some comments on why we cache the 'active' bool instead of using an alias
commit77ffd43a306ecdd0c69083b22b3c9e7245be68e4 authorMichael Terry <michael.terry@canonical.com> dateWed 11 Mar 2015, 10:48 (12 years ago) parent4eb2771
1 file changed+5
qml/Wizard/Wizard.qml+5
qml/Wizard/Wizard.qml+5
@@ -25,6 +25,11 @@ Showable {
2525 // The background wallpaper to use
2626 property string background
2727
28+ // This is a bool instead of an alias because Loader classes like to emit
29+ // changed signals for 'active' during startup even if they aren't actually
30+ // changing values. Having it cached as a proper Qml bool property prevents
31+ // unnecessary 'changed' emissions and provides consuming classes the
32+ // expected behavior of no emission on startup.
2833 readonly property bool active: loader.active
2934
3035 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }