summaryrefslogtreecommitdiffstats
path: root/startupscreen
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-12-03 14:18:46 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2020-12-04 08:09:16 +0000
commit5df03932a3046b23e26007f439222525fa221c3f (patch)
treeea846c7528640ccf7dec07cf671e7be73e1487a5 /startupscreen
parentc7d64e34d25889560c8a82ca5cd1e3db07c4c904 (diff)
startupscreen: correctly set usb mode
Use the correct property to set initial usb mode value to the combobox. Change-Id: I395aa070bcb0c5f640bbecc5ab44550d41b50106 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Diffstat (limited to 'startupscreen')
-rw-r--r--startupscreen/UsbModeDialog.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/startupscreen/UsbModeDialog.qml b/startupscreen/UsbModeDialog.qml
index e923ac9..de4c2f6 100644
--- a/startupscreen/UsbModeDialog.qml
+++ b/startupscreen/UsbModeDialog.qml
@@ -75,7 +75,7 @@ Dialog {
reboot.open()
}
onRejected: {
- combobox.currentIndex = SettingsManager.mode === "cdcecm" ? 0 : 1
+ combobox.currentIndex = combobox.indexOfValue(SettingsManager.usbMode)
}
ColumnLayout {
@@ -91,7 +91,7 @@ Dialog {
}
ComboBox {
id: combobox
- currentIndex: SettingsManager.mode === "cdcecm" ? 0 : 1
+ Component.onCompleted: currentIndex = indexOfValue(SettingsManager.usbMode)
model: ["cdcecm", "rndis"]
}
}