X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=HomeScreen%2Fqml%2FHome.qml;h=aa3a129beff917639c924fd7bdea092800d5a8e7;hb=09f2f0036f122e49aa49e6c446d723850192a725;hp=cfcd1c808930b2cbcae48ea1a3c7588cdacdbe43;hpb=f2b8bddb94a451c4bd822ef723a8b739236f4b4f;p=staging%2FHomeScreen.git diff --git a/HomeScreen/qml/Home.qml b/HomeScreen/qml/Home.qml index cfcd1c8..aa3a129 100644 --- a/HomeScreen/qml/Home.qml +++ b/HomeScreen/qml/Home.qml @@ -1,5 +1,6 @@ /* * Copyright (C) 2016 The Qt Company Ltd. + * Copyright (C) 2016, 2017 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!") + } } } }