summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-02-08 17:26:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-11 15:17:07 +0100
commitd180560e148722071f30fbbbfcdce01b01ba8cdf (patch)
treee0d35b92262b140e9bbf495f7e448f6cce46f95f /tests
parentc927d6b9e161ee22822dbfb0654f5734c9101aa7 (diff)
Fix QWindow::setFramePosition() to keep the size.
Change-Id: I14551e0d0573c2e8d86d76eadab4df9f3c8ed5e4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'tests')
-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();