summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2024-02-06 19:32:50 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-07 18:24:56 +0000
commitcefc8cb3e57c96c30a57cd9db1076ac2734d2450 (patch)
tree2c2ed378337bcc97b481c415489bc949b8156160
parentd741efcab62db8f0412183b2722c4c313d1c9981 (diff)
Examples: check if the server command is valid in package-installation
This is only the case, if the example is started via the generated .bat/.sh wrapper. Change-Id: I9f9ea0c54547c5be2a37ad3683755399e053ea1f Reviewed-by: Bernd Weimer <bernd.weimer@qt.io> (cherry picked from commit 4fa3b3c4dffb7b9cb2e6634cc5b78de483c1160e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/applicationmanager/package-installation/system-ui/main.qml10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/applicationmanager/package-installation/system-ui/main.qml b/examples/applicationmanager/package-installation/system-ui/main.qml
index 03e60ff0..672b8a38 100644
--- a/examples/applicationmanager/package-installation/system-ui/main.qml
+++ b/examples/applicationmanager/package-installation/system-ui/main.qml
@@ -40,9 +40,13 @@ ApplicationWindow {
}
Component.onCompleted: {
- console.info("\n\n", "You can start an appman-package-server instance like this:",
- "\n\n", " ", ApplicationManager.systemProperties.serverBinary, "--dd",
- ApplicationManager.systemProperties.serverBaseDir, "\n\n")
+ if (ApplicationManager.systemProperties.serverBinary
+ && ApplicationManager.systemProperties.serverBaseDir) {
+ console.info("\n\n", "You can start an appman-package-server instance like this:",
+ "\n\n", " ", ApplicationManager.systemProperties.serverBinary, "--dd",
+ ApplicationManager.systemProperties.serverBaseDir,
+ "\n\n")
+ }
}
}