Do not try to handle not-installed apps
authorBocklage, Jens <Jens_Bocklage@mentor.com>
Tue, 13 Dec 2016 13:41:06 +0000 (14:41 +0100)
committerBocklage, Jens <Jens_Bocklage@mentor.com>
Tue, 13 Dec 2016 13:41:06 +0000 (14:41 +0100)
Apps that are not installed will not
trigger any further action now

Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
HomeScreen/qml/Home.qml
HomeScreen/qml/ShortcutArea.qml

index 94c10b4..3c8f109 100644 (file)
@@ -50,11 +50,16 @@ Item {
             onClicked: {
                 console.log("app is ", model.id)
                 pid = launcher.launch(model.id)
-                layoutHandler.makeMeVisible(pid)
+                if (1 < pid) {
+                    layoutHandler.makeMeVisible(pid)
 
-                applicationArea.visible = true
-                appLauncherAreaLauncher.visible = false
-                layoutHandler.showAppLayer()
+                    applicationArea.visible = true
+                    appLauncherAreaLauncher.visible = false
+                    layoutHandler.showAppLayer()
+                }
+                else {
+                    console.warn("app cannot be launched!")
+                }
             }
         }
     }
index d9931cb..684b845 100644 (file)
@@ -65,11 +65,16 @@ Item {
                         layoutHandler.hideAppLayer()
                     }
                     else {
-                        applicationArea.visible = true
-                        appLauncherAreaLauncher.visible = false
                         pid = launcher.launch(model.application)
-                        layoutHandler.makeMeVisible(pid)
-                        layoutHandler.showAppLayer()
+                        if (1 < pid) {
+                            applicationArea.visible = true
+                            appLauncherAreaLauncher.visible = false
+                            layoutHandler.makeMeVisible(pid)
+                            layoutHandler.showAppLayer()
+                        }
+                        else {
+                            console.warn("app cannot be launched!")
+                        }
                     }
                 }
             }