Fix a couple qml warnings
commitbc94814c3b2490e4c39ed833b1741bff9010b40e
authorMichael Terry <michael.terry@canonical.com>
dateWed 18 Feb 2015, 13:29 (12 years ago)
parent1e7da17
qml/Stages/ApplicationWindow.qml+1−1
@@ -43,7 +43,7 @@ FocusScope {
4343 readonly property color splashColor: root.application ? root.application.splashColor : "#00000000"
4444 readonly property color splashColorHeader: root.application ? root.application.splashColorHeader : "#00000000"
4545 readonly property color splashColorFooter: root.application ? root.application.splashColorFooter : "#00000000"
46− readonly property url defaultScreenshot: root.application ? root.application.defaultScreenshot : ""
46+ readonly property url defaultScreenshot: (root.application && root.application.defaultScreenshot !== undefined) ? root.application.defaultScreenshot : ""
4747
4848 // Whether the Application had a surface before but lost it.
4949 property bool hadSurface: sessionContainer.surfaceContainer.hadSurface
qml/Stages/PhoneStage.qml+5−1
@@ -125,7 +125,11 @@ Rectangle {
125125
126126 onFocusedAppIdChanged: focusedAppDelegate = spreadRepeater.itemAt(0);
127127
128− onFocusedAppDelegateChanged: focusedAppDelegate.focus = true;
128+ onFocusedAppDelegateChanged: {
129+ if (focusedAppDelegate) {
130+ focusedAppDelegate.focus = true;
131+ }
132+ }
129133
130134 function indexOf(appId) {
131135 for (var i = 0; i < applicationManager.count; i++) {