From d12073561a26e86d59a93bec103e3c8c66a6d612 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 15 Jan 2019 22:46:15 -0800 Subject: settings: bluetooth: switch from Component.onCompleted power event 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 --- app/bluetooth/Bluetooth.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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 { -- cgit 1.2.3-korg