From 1ab17be84ea56ad55df360702cecb5a54b2438fe Mon Sep 17 00:00:00 2001 From: Daniel d'Andrada Date: Thu, 11 Jan 2018 14:41:26 +0100 Subject: Update tst_WidgetGrid "make check" and "make tryWidgetGrid" now work again --- tests/qmltests/FakeAppInfo.qml | 54 +++++++++++++++++++++++++++++++++++++++ tests/qmltests/tst_WidgetGrid.qml | 49 +++++------------------------------ 2 files changed, 60 insertions(+), 43 deletions(-) create mode 100644 tests/qmltests/FakeAppInfo.qml (limited to 'tests') diff --git a/tests/qmltests/FakeAppInfo.qml b/tests/qmltests/FakeAppInfo.qml new file mode 100644 index 00000000..f6ddf3cd --- /dev/null +++ b/tests/qmltests/FakeAppInfo.qml @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Pelagicore AG +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Triton IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.6 + +QtObject { + id: root + + property Item window + + property bool active: false + property bool canBeActive: true + + property url icon + + property int heightRows: 1 + property int minHeightRows: 1 + + property int widgetHeight + property int currentWidth + property int currentHeight + property string windowState + + property bool asWidget: true + property var categories: ["widget"] +} diff --git a/tests/qmltests/tst_WidgetGrid.qml b/tests/qmltests/tst_WidgetGrid.qml index b74b3fae..d7060e25 100644 --- a/tests/qmltests/tst_WidgetGrid.qml +++ b/tests/qmltests/tst_WidgetGrid.qml @@ -46,58 +46,21 @@ Item { Binding { target: Style; property: "cellWidth"; value: root.width / 24 } Binding { target: Style; property: "cellHeight"; value: root.height / 24 } - QtObject { + FakeAppInfo { id: redApp - property Item window - property Item loadedWindow: Rectangle { color: "red" } - - property bool active: false - property bool canBeActive: true - - property int heightRows: 1 - property int minHeightRows: 1 - - property bool asWidget: true - - function start() { - window = loadedWindow; - } + property Item window: Rectangle { color: "red" } } - QtObject { + FakeAppInfo { id: greenApp - property Item window - property Item loadedWindow: Rectangle { color: "green" } - - property bool active: false - property bool canBeActive: true - + property Item window: Rectangle { color: "green" } property int heightRows: 2 - property int minHeightRows: 1 - - property bool asWidget: true - - function start() { - window = loadedWindow; - } } - QtObject { + FakeAppInfo { id: blueApp - property Item window - property Item loadedWindow: Rectangle { color: "blue" } - - property bool active: false - property bool canBeActive: true - + property Item window: Rectangle { color: "blue" } property int heightRows: 2 - property int minHeightRows: 1 - - property bool asWidget: true - - function start() { - window = loadedWindow; - } } ListModel { -- cgit v1.2.3