summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2016-11-07 11:16:17 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2016-11-07 11:00:32 +0000
commite24ecdf6b966a45e3bc661fae827a3433e07aac3 (patch)
treeede2084ec540de76b1df71e1898fad6fa21d4bee
parentce430f4abf71b5efe70fc9821f0eb2560307baf9 (diff)
demo: don't explicitly call updateConfigView
.. when it will be handled in onRepositoryConfigChanged. Change-Id: Id8b0ed384a9e6632d53324ffb2bfdfb95bb8c2c7 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
-rw-r--r--examples/qml/basic/main.qml15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/qml/basic/main.qml b/examples/qml/basic/main.qml
index 7e65462..85a9085 100644
--- a/examples/qml/basic/main.qml
+++ b/examples/qml/basic/main.qml
@@ -67,19 +67,20 @@ Window {
if (currentConfig && OtaClient.repositoryConfigsEqual(currentConfig, config)) {
if (!silent)
log("The configuration is already set")
- return;
+ return false;
} else {
if (!OtaClient.removeRepositoryConfig()) {
logError("Failed to remove repository configuration")
- return;
+ return false;
}
}
if (!OtaClient.setRepositoryConfig(config)) {
logError("Failed to update repository configuration")
- return;
+ return false;
}
-
- log("Successfully updated repository configuration")
+ if (!silent)
+ log("Successfully updated repository configuration")
+ return true;
}
function updateConfigView(config) {
@@ -243,8 +244,8 @@ Window {
onStatusChanged: log(status)
onInitializationFinished: {
logWithCondition("Initialization", OtaClient.initialized)
- configureRepository(basicConfig, true)
- updateConfigView(OtaClient.repositoryConfig())
+ if (!configureRepository(basicConfig, true))
+ updateConfigView(OtaClient.repositoryConfig())
updateBootedMetadataLabel()
updateRemoteMetadataLabel()
updateRollbackMetadataLabel()