Remove unused imports from Home.qml
[staging/HomeScreen.git] / HomeScreen / qml / Home.qml
index cfcd1c8..5800f81 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Qt Company Ltd.
+ * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,8 +16,6 @@
  */
 
 import QtQuick 2.2
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 1.0
 import Home 1.0
 
 Item {
@@ -37,6 +36,7 @@ Item {
         height: cellHeight * 3
         cellWidth: 320
         cellHeight: 320
+        interactive: false
 
         model: ApplicationModel {}
         delegate: MouseArea {
@@ -49,11 +49,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(pid)
+                }
+                else {
+                    console.warn("app cannot be launched!")
+                }
             }
         }
     }