From d180560e148722071f30fbbbfcdce01b01ba8cdf Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Feb 2013 17:26:47 +0100 Subject: Fix QWindow::setFramePosition() to keep the size. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I14551e0d0573c2e8d86d76eadab4df9f3c8ed5e4 Reviewed-by: Samuel Rødal --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') 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(); -- cgit v1.2.3