summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/kernel/qwindow/tst_qwindow.cpp')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 8c5432e746..30666aaf2a 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -173,9 +173,13 @@ void tst_QWindow::positioning()
// Some platforms enforce minimum widths for windows, which can cause extra resize
// events, so set the width to suitably large value to avoid those.
- QRect geometry(80, 80, 300, 40);
+ const QSize size = QSize(300, 40);
+ const QRect geometry(QPoint(80, 80), size);
Window window;
+ window.setGeometry(QRect(QPoint(20, 20), size));
+ window.setFramePosition(QPoint(40, 40)); // Move window around before show, size must not change.
+ QCOMPARE(window.geometry().size(), size);
window.setGeometry(geometry);
QCOMPARE(window.geometry(), geometry);
window.show();