summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmainwindow/tst_qmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmainwindow/tst_qmainwindow.cpp')
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qmainwindow/tst_qmainwindow.cpp b/tests/auto/qmainwindow/tst_qmainwindow.cpp
index 6505f90..38d23b6 100644
--- a/tests/auto/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/qmainwindow/tst_qmainwindow.cpp
@@ -1692,8 +1692,12 @@ void tst_QMainWindow::dockWidgetSize()
mainWindow.show();
QTest::qWait(100);
- QCOMPARE(widget.size(), widget.sizeHint());
- QCOMPARE(dock.widget()->size(), dock.widget()->sizeHint());
+ if (mainWindow.size() == mainWindow.sizeHint()) {
+ QCOMPARE(widget.size(), widget.sizeHint());
+ QCOMPARE(dock.widget()->size(), dock.widget()->sizeHint());
+ } else {
+ //otherwise the screen is too small and the size are irrelevant
+ }
}