aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/dummyimports/QtApplicationManager/SystemUI/WindowItem.qml14
-rw-r--r--tests/qmltests/FakeAppInfo.qml2
-rw-r--r--tests/qmltests/tst_WidgetGrid.qml15
3 files changed, 27 insertions, 4 deletions
diff --git a/tests/dummyimports/QtApplicationManager/SystemUI/WindowItem.qml b/tests/dummyimports/QtApplicationManager/SystemUI/WindowItem.qml
index 6fd261ec..d66f513c 100644
--- a/tests/dummyimports/QtApplicationManager/SystemUI/WindowItem.qml
+++ b/tests/dummyimports/QtApplicationManager/SystemUI/WindowItem.qml
@@ -32,7 +32,19 @@
import QtQuick 2.6
Item {
- property var window: null
+ id: root
+
+ property Item window
+ onWindowChanged: {
+ if (window) {
+ window.parent = root;
+ window.x = 0;
+ window.y = 0;
+ window.width = Qt.binding(function() { return root.width; });
+ window.height = Qt.binding(function() { return root.height; });
+ }
+ }
+
property bool primary: true
property bool objectFollowsItemSize: true
diff --git a/tests/qmltests/FakeAppInfo.qml b/tests/qmltests/FakeAppInfo.qml
index d83fecc2..17df2604 100644
--- a/tests/qmltests/FakeAppInfo.qml
+++ b/tests/qmltests/FakeAppInfo.qml
@@ -52,4 +52,6 @@ QtObject {
property bool asWidget: true
property var categories: ["widget"]
+
+ property bool windowPerfMonitorEnabled: false
}
diff --git a/tests/qmltests/tst_WidgetGrid.qml b/tests/qmltests/tst_WidgetGrid.qml
index f4392345..3054d8a3 100644
--- a/tests/qmltests/tst_WidgetGrid.qml
+++ b/tests/qmltests/tst_WidgetGrid.qml
@@ -44,18 +44,27 @@ Item {
FakeAppInfo {
id: redApp
- property Item window: Rectangle { color: "red" }
+ property Item window: Rectangle {
+ color: "red"
+ function setWindowProperty(name, value) {}
+ }
}
FakeAppInfo {
id: greenApp
- property Item window: Rectangle { color: "green" }
+ property Item window: Rectangle {
+ color: "green"
+ function setWindowProperty(name, value) {}
+ }
property int heightRows: 2
}
FakeAppInfo {
id: blueApp
- property Item window: Rectangle { color: "blue" }
+ property Item window: Rectangle {
+ color: "blue"
+ function setWindowProperty(name, value) {}
+ }
property int heightRows: 2
}