From: Ruediger Gad Date: Sun, 15 Apr 2012 09:46:22 +0000 (+0200) Subject: Optimize startup and scan. X-Git-Url: http://git.maemo.org/git/?p=qzeecontrol;a=commitdiff_plain;h=f80db0024b0387171081fe05fbb19731c6dd055a Optimize startup and scan. --- diff --git a/QZeeControl.pro.user b/QZeeControl.pro.user index d52f5f0..8269ed3 100644 --- a/QZeeControl.pro.user +++ b/QZeeControl.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/qml/QZeeControl/MainPage.qml b/qml/QZeeControl/MainPage.qml index 5d878b1..848babc 100644 --- a/qml/QZeeControl/MainPage.qml +++ b/qml/QZeeControl/MainPage.qml @@ -28,6 +28,8 @@ Page { orientationLock: PageOrientation.LockPortrait + property bool initializing: true + Component.onCompleted: { SettingsStorage.initialize(); @@ -45,6 +47,7 @@ Page { } loadKeyBindings() + initializing = false } function setKeyBindingsToDefault(){ @@ -245,6 +248,9 @@ Page { text: "No device found yet." onTextChanged: { + if(initializing) + return + if(text === "No device found yet.") return @@ -261,6 +267,9 @@ Page { validator: IntValidator{} onTextChanged: { + if(initializing) + return + if(text === "na") return @@ -300,7 +309,6 @@ Page { onClicked: { btConn.disconnect() - } } @@ -393,6 +401,8 @@ Page { if(service.serviceName === "Zeemote"){ addressField.text = service.deviceAddress portField.text = service.servicePort + discovery = false + console.log("Found device. Stopped further discovery.") } } }