summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2014-04-08 19:31:45 +0200
committerFabian Bumberger <fbumberger@rim.com>2014-06-25 14:43:13 +0200
commite83c52a997dd84f3f69c5a9d3b787ee04c6d78f1 (patch)
treea0429d595b1f801994026206bd0e7c95f9127eb4 /tests
parent7a4dcbaabf037a6913a5662ebb74cc47e04673b9 (diff)
QNX: Fix QMdiWindow autotests
In "setOpaqueResizeAndMove" this patch makes sure that the content of a subwindow actually fits into the window, otherwise the resize does not work properly. The content is dpi dependent and thus the pixel size of it increases with the display dpi value. Furthermore when moving the QMdiSubwindow this patch makes sure that we actually grab the window's header and not one of it's tool buttons (minimize, maximize, close). Change-Id: I88314994957c5883f57c09c9240a3b83f1ee42ed Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index ffc3e3b67d..87d87eb4bc 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -444,7 +444,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
QVERIFY(!nestedWindow->maximizedButtonsWidget());
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) && !defined(Q_OS_QNX)
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
.arg(originalWindowTitle, window->widget()->windowTitle()));
#endif
@@ -687,8 +687,8 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove_data()
QTest::addColumn<QSize>("workspaceSize");
QTest::addColumn<QSize>("windowSize");
- QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(200, 200);
- QTest::newRow("rubberband mode") << false << 20 << 1 << QSize(400, 400) << QSize(200, 200);
+ QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(240, 200);
+ QTest::newRow("rubberband mode") << false << 20 << 1 << QSize(400, 400) << QSize(240, 200);
}
void tst_QMdiSubWindow::setOpaqueResizeAndMove()
@@ -779,7 +779,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove()
// ### Remove this after mac style has been fixed
height -= 4;
#endif
- QPoint mousePosition(window->width() / 2, height - 1);
+ QPoint mousePosition(window->width() / 3, height - 1);
sendMouseMove(window, mousePosition, Qt::NoButton);
sendMousePress(window, mousePosition);
@@ -1478,6 +1478,9 @@ void tst_QMdiSubWindow::hideAndShow()
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
+#if defined Q_OS_QNX
+ QEXPECT_FAIL("", "QTBUG-38231", Abort);
+#endif
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1702,6 +1705,9 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
qApp->processEvents();
+#if defined Q_OS_QNX
+ QEXPECT_FAIL("", "QTBUG-38231", Abort);
+#endif
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopLeftCorner), subWindow->maximizedSystemMenuIconWidget());