diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-09 03:07:01 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-09 03:07:01 +0100 |
commit | cb182fb50e49fa88f7bf33f2407447167fd8048f (patch) | |
tree | 3e8cc6319ee9b2c4d20f7e0bcb784928f916146e /tests | |
parent | 611422b5968ceac6cfba034116a3d1e107d8e2df (diff) | |
parent | 9c05807b951167bc0c8385811c9df1bd9d48ca6d (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib14b8c77cefe7aaf5b11483d9a30b2ef05314598
Diffstat (limited to 'tests')
38 files changed, 101 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_splitview.qml b/tests/auto/controls/data/tst_splitview.qml index 76572a00..c125b99e 100644 --- a/tests/auto/controls/data/tst_splitview.qml +++ b/tests/auto/controls/data/tst_splitview.qml @@ -146,6 +146,13 @@ TestCase { implicitWidth: defaultHorizontalHandleWidth implicitHeight: defaultVerticalHandleHeight color: "#444" + + Text { + text: parent.x + "," + parent.y + " " + parent.width + "x" + parent.height + color: "white" + anchors.centerIn: parent + rotation: 90 + } } } @@ -834,6 +841,36 @@ TestCase { } } + Component { + id: repeaterSplitViewComponent + + SplitView { + anchors.fill: parent + handle: handleComponent + + property alias repeater: repeater + + Repeater { + id: repeater + model: 3 + delegate: Rectangle { + objectName: "rectDelegate" + index + + SplitView.preferredWidth: 25 + + color: "#aaff0000" + + Text { + text: parent.x + "," + parent.y + " " + parent.width + "x" + parent.height + color: "white" + rotation: 90 + anchors.centerIn: parent + } + } + } + } + } + function test_dragHandle_data() { var splitViewWidth = testCase.width - splitViewMargins * 2 var splitViewHeight = testCase.height - splitViewMargins * 2 @@ -1092,6 +1129,28 @@ TestCase { { x: 25 + 100 + defaultHorizontalHandleWidth, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight }, { x: 25 + 100 + defaultHorizontalHandleWidth * 2, y: 0, width: splitViewWidth - 100, height: splitViewHeight } ] + }, + { + tag: "repeater", + component: repeaterSplitViewComponent, + orientation: Qt.Horizontal, + fillIndex: 2, + handleIndex: 1, + newHandlePos: Qt.point(200, testCase.height / 2), + expectedGeometriesBeforeDrag: [ + { x: 0, y: 0, width: 25, height: splitViewHeight }, + { x: 25, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight }, + { x: 25 + defaultHorizontalHandleWidth, y: 0, width: 25, height: splitViewHeight }, + { x: 25 * 2 + defaultHorizontalHandleWidth, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight }, + { x: 25 * 2 + defaultHorizontalHandleWidth * 2, y: 0, width: splitViewWidth - 70 , height: splitViewHeight } + ], + expectedGeometriesAfterDrag: [ + { x: 0, y: 0, width: 25, height: splitViewHeight }, + { x: 25, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight }, + { x: 25 + defaultHorizontalHandleWidth, y: 0, width: 105, height: splitViewHeight }, + { x: 140, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight }, + { x: 150, y: 0, width: 150, height: splitViewHeight } + ] } ] return data @@ -1122,6 +1181,7 @@ TestCase { var targetHandle = handles[data.handleIndex] mousePress(targetHandle) verify(control.resizing) + // newHandlePos is in scene coordinates, so map it to coordinates local to the handle. var localPos = testCase.mapToItem(targetHandle, data.newHandlePos.x, data.newHandlePos.y) mouseMove(targetHandle, localPos.x - targetHandle.width / 2, localPos.y - targetHandle.height / 2) verify(control.resizing) @@ -1957,4 +2017,13 @@ TestCase { // Shouldn't be an assertion failure. control.visible = false } + + // QTBUG-79302: ensure that the Repeater's items are actually generated. + // test_dragHandle:repeater tests dragging behavior with a Repeater. + function test_repeater(data) { + var control = createTemporaryObject(repeaterSplitViewComponent, testCase) + verify(control) + compare(control.repeater.count, 3) + compare(control.contentChildren.length, 3) + } } diff --git a/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png Binary files differindex 18b7c678..4356af95 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png +++ b/tests/auto/qquickiconimage/icons/testtheme/16x16/actions/appointment-new.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png Binary files differindex c6ceca43..d3134a55 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png Binary files differindex f380ebb6..250b94b0 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/+testselector/appointment-new@2x.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png Binary files differindex d676ffd4..04cd010a 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png Binary files differindex 63ae9ce7..a63bbaf4 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/appointment-new@2x.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png Binary files differindex 2d876cc1..c17d1664 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png Binary files differindex c65fbed0..d4411658 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-original@2x.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png Binary files differindex 220a313d..6f7938e3 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png Binary files differindex cd66ef69..9215fc42 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22/actions/color-test-tinted@2x.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png Binary files differindex f380ebb6..250b94b0 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/+testselector/appointment-new.png diff --git a/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png Binary files differindex 63ae9ce7..a63bbaf4 100644 --- a/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png +++ b/tests/auto/qquickiconimage/icons/testtheme/22x22@2/actions/appointment-new.png diff --git a/tests/auto/qquickimaginestyle/control-assets/button-background.9.png b/tests/auto/qquickimaginestyle/control-assets/button-background.9.png Binary files differindex 29bd8d7c..18ec9e6f 100644 --- a/tests/auto/qquickimaginestyle/control-assets/button-background.9.png +++ b/tests/auto/qquickimaginestyle/control-assets/button-background.9.png diff --git a/tests/auto/qquickimaginestyle/test-assets/button-background-1.png b/tests/auto/qquickimaginestyle/test-assets/button-background-1.png Binary files differindex 244b707b..980eec3c 100644 --- a/tests/auto/qquickimaginestyle/test-assets/button-background-1.png +++ b/tests/auto/qquickimaginestyle/test-assets/button-background-1.png diff --git a/tests/auto/qquickimaginestyle/test-assets/button-background-2.png b/tests/auto/qquickimaginestyle/test-assets/button-background-2.png Binary files differindex 54f5ecd8..8e2639d0 100644 --- a/tests/auto/qquickimaginestyle/test-assets/button-background-2.png +++ b/tests/auto/qquickimaginestyle/test-assets/button-background-2.png diff --git a/tests/auto/qquickninepatchimage/data/foo.9.png b/tests/auto/qquickninepatchimage/data/foo.9.png Binary files differindex 51246990..bac09a4d 100644 --- a/tests/auto/qquickninepatchimage/data/foo.9.png +++ b/tests/auto/qquickninepatchimage/data/foo.9.png diff --git a/tests/auto/qquickninepatchimage/data/foo@2x.9.png b/tests/auto/qquickninepatchimage/data/foo@2x.9.png Binary files differindex c8dc30a3..43e4b478 100644 --- a/tests/auto/qquickninepatchimage/data/foo@2x.9.png +++ b/tests/auto/qquickninepatchimage/data/foo@2x.9.png diff --git a/tests/auto/qquickninepatchimage/data/foo@3x.9.png b/tests/auto/qquickninepatchimage/data/foo@3x.9.png Binary files differindex 00ea4e05..4d199c84 100644 --- a/tests/auto/qquickninepatchimage/data/foo@3x.9.png +++ b/tests/auto/qquickninepatchimage/data/foo@3x.9.png diff --git a/tests/auto/qquickninepatchimage/data/foo@4x.9.png b/tests/auto/qquickninepatchimage/data/foo@4x.9.png Binary files differindex ea73340a..018b8341 100644 --- a/tests/auto/qquickninepatchimage/data/foo@4x.9.png +++ b/tests/auto/qquickninepatchimage/data/foo@4x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-all.9.png b/tests/auto/qquickninepatchimage/data/inset-all.9.png Binary files differindex e08ef9c7..a1899429 100644 --- a/tests/auto/qquickninepatchimage/data/inset-all.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-all.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png b/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png Binary files differindex 96d1c0e8..d00d719c 100644 --- a/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-all@2x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png b/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png Binary files differindex 215ce27e..6130fd50 100644 --- a/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-all@3x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png b/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png Binary files differindex 35e53101..2c2d1694 100644 --- a/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-all@4x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png Binary files differindex c4c37dff..2b3e58cb 100644 --- a/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-bottomright.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png Binary files differindex 3d64036f..70aceb61 100644 --- a/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-bottomright@2x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png Binary files differindex 115184d9..032400ce 100644 --- a/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-bottomright@3x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png b/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png Binary files differindex 2ec7cbef..d5cf85aa 100644 --- a/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-bottomright@4x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft.9.png Binary files differindex 9cc5f43d..05a2ff70 100644 --- a/tests/auto/qquickninepatchimage/data/inset-topleft.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-topleft.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png Binary files differindex a4ca2b12..a88f87a5 100644 --- a/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-topleft@2x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png Binary files differindex 73f3595a..16349d22 100644 --- a/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-topleft@3x.9.png diff --git a/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png b/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png Binary files differindex 78baa463..160fab61 100644 --- a/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png +++ b/tests/auto/qquickninepatchimage/data/inset-topleft@4x.9.png diff --git a/tests/auto/qquickninepatchimage/data/padding.9.png b/tests/auto/qquickninepatchimage/data/padding.9.png Binary files differindex 5b4f0960..8a65afad 100644 --- a/tests/auto/qquickninepatchimage/data/padding.9.png +++ b/tests/auto/qquickninepatchimage/data/padding.9.png diff --git a/tests/auto/qquickninepatchimage/data/padding@2x.9.png b/tests/auto/qquickninepatchimage/data/padding@2x.9.png Binary files differindex 44eb1943..101fc0cb 100644 --- a/tests/auto/qquickninepatchimage/data/padding@2x.9.png +++ b/tests/auto/qquickninepatchimage/data/padding@2x.9.png diff --git a/tests/auto/qquickninepatchimage/data/padding@3x.9.png b/tests/auto/qquickninepatchimage/data/padding@3x.9.png Binary files differindex d1563448..e07a93a2 100644 --- a/tests/auto/qquickninepatchimage/data/padding@3x.9.png +++ b/tests/auto/qquickninepatchimage/data/padding@3x.9.png diff --git a/tests/auto/qquickninepatchimage/data/padding@4x.9.png b/tests/auto/qquickninepatchimage/data/padding@4x.9.png Binary files differindex e86cce69..a3506444 100644 --- a/tests/auto/qquickninepatchimage/data/padding@4x.9.png +++ b/tests/auto/qquickninepatchimage/data/padding@4x.9.png diff --git a/tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml b/tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml new file mode 100644 index 00000000..b9606eb2 --- /dev/null +++ b/tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml @@ -0,0 +1,16 @@ +import QtQuick 2.13 +import QtQuick.Window 2.13 +import QtQuick.Controls 2.13 + +Window { + width: 400 + height: 400 + Popup { + objectName: "popup" + visible: true + width: 200 + height: 200 + anchors.centerIn: parent + closePolicy: Popup.CloseOnEscape + } +} diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp index 2c173c63..76c38ea8 100644 --- a/tests/auto/qquickpopup/tst_qquickpopup.cpp +++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp @@ -82,6 +82,7 @@ private slots: void cursorShape(); void componentComplete(); void closeOnEscapeWithNestedPopups(); + void closeOnEscapeWithVisiblePopup(); void enabled(); void orientation_data(); void orientation(); @@ -1021,6 +1022,21 @@ void tst_QQuickPopup::closeOnEscapeWithNestedPopups() QCOMPARE(stackView->depth(), 1); } +void tst_QQuickPopup::closeOnEscapeWithVisiblePopup() +{ + QQuickApplicationHelper helper(this, QStringLiteral("closeOnEscapeWithVisiblePopup.qml")); + QQuickWindow *window = helper.window; + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window)); + + QQuickPopup *popup = window->findChild<QQuickPopup *>("popup"); + QVERIFY(popup); + QTRY_VERIFY(popup->isOpened()); + + QTest::keyClick(window, Qt::Key_Escape); + QTRY_VERIFY(!popup->isVisible()); +} + void tst_QQuickPopup::enabled() { QQuickPopup popup; diff --git a/tests/manual/systemtrayicon/images/qt_logo_green_256.png b/tests/manual/systemtrayicon/images/qt_logo_green_256.png Binary files differindex 92243fd5..a7b16ba4 100644 --- a/tests/manual/systemtrayicon/images/qt_logo_green_256.png +++ b/tests/manual/systemtrayicon/images/qt_logo_green_256.png |