on xenial help sign in
Add some comments on why we cache the 'active' bool instead of using an alias
77ffd43Michael Terry
qml/Wizard/Wizard.qml+5
@@ -25,6 +25,11 @@ Showable {
25 // The background wallpaper to use
25 // The background wallpaper to use
26 property string background
26 property string background
27
27
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.
28 readonly property bool active: loader.active
33 readonly property bool active: loader.active
29
34
30 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
35 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }