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-15 22:54:37 -0800
commitbd354afb7d8936c5f50eb2f1980b64ee55ded862 (patch)
treec99562691cf935f2c9bb1009137fd2a72b38f56b
parent3f16f45cdf928cfc500a86e20e6c7e5a45ce3832 (diff)
settings: bluetooth: switch from Component.onCompleted power eventflounder_6.0.4flounder/6.0.46.0.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 {