From f80db0024b0387171081fe05fbb19731c6dd055a Mon Sep 17 00:00:00 2001 From: Ruediger Gad Date: Sun, 15 Apr 2012 11:46:22 +0200 Subject: [PATCH] Optimize startup and scan. --- QZeeControl.pro.user | 2 +- qml/QZeeControl/MainPage.qml | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) 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.") } } } -- 1.7.9.5