From d7fac182fe090831ac5f9e70d0615aec298ff1e2 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 10 Sep 2009 09:54:28 +0200 Subject: Autotest fix for QMainWindow On embedded, the size of the screen is too small to leave enough space for the dock widgets. --- tests/auto/qmainwindow/tst_qmainwindow.cpp | 8 ++++++-- 1 file 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 + } } -- cgit v0.12