on xenial help sign in
Fix type errors
16ab292Rodney Dawes
qml/Panel/Indicators/IndicatorsLight.qml+2−2
@@ -204,11 +204,11 @@ console.log("no support for Multicolor LED. " + indicatorState)
204 property variant deviceState: action("device-state").state
204 property variant deviceState: action("device-state").state
205 Component.onCompleted: start()
205 Component.onCompleted: start()
206 onBatteryLevelChanged: {
206 onBatteryLevelChanged: {
207− root.batteryLevel = batteryLevel
207+ root.batteryLevel = batteryLevel ? batteryLevel : 0.00
208 updateLightState("onBatteryLevelChanged")
208 updateLightState("onBatteryLevelChanged")
209 }
209 }
210 onDeviceStateChanged: {
210 onDeviceStateChanged: {
211− root.deviceState = deviceState
211+ root.deviceState = deviceState ? deviceState : "unknown"
212 updateLightState("onDeviceStateChanged")
212 updateLightState("onDeviceStateChanged")
213 }
213 }
214 }
214 }
qml/Shell.qml+1−1
@@ -90,7 +90,7 @@ StyledItem {
90 } else if (showingGreeter || notifications.topmostIsFullscreen) {
90 } else if (showingGreeter || notifications.topmostIsFullscreen) {
91 return Qt.PrimaryOrientation;
91 return Qt.PrimaryOrientation;
92 } else {
92 } else {
93− return shell.orientations.map(stage.supportedOrientations);
93+ return shell.orientations ? shell.orientations.map(stage.supportedOrientations) : Qt.PrimaryOrientation;
94 }
94 }
95 }
95 }
96
96