summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-01-15 22:46:15 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-01-16 06:55:15 +0000
commitd12073561a26e86d59a93bec103e3c8c66a6d612 (patch)
treec4483a9bfd45249a10ba8d3416dd801becc953f4
parentc76516679dafd03113b5afa8f32c82cc871b9b67 (diff)
settings: bluetooth: switch from Component.onCompleted power eventhalibut_7.90.0halibut/7.90.0guppy_6.99.4guppy/6.99.47.90.06.99.4
Race condition between QML components finishing loadings before libqtappfw access can happen. So use the the onPowerChanged event as before, but to avoid infinite loop of power changes don't changed checked field if already set. Bug-AGL: SPEC-2004 Change-Id: Ie54ca405cab70e1bb909005dce602a56ccb0e8ba Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--app/bluetooth/Bluetooth.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/bluetooth/Bluetooth.qml b/app/bluetooth/Bluetooth.qml
index 32577bf..6c93b2e 100644
--- a/app/bluetooth/Bluetooth.qml
+++ b/app/bluetooth/Bluetooth.qml
@@ -101,7 +101,7 @@ SettingPage {
}
}
- Component.onCompleted: root.checked = bluetooth.power
+ onPowerChanged: if (!root.checked) root.checked = state
}
Text {