summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmainwindow
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-09-10 07:54:28 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-09-10 07:58:13 (GMT)
commitd7fac182fe090831ac5f9e70d0615aec298ff1e2 (patch)
tree7066ed66ae14b846d6e17cbc0d780bf77c59ac06 /tests/auto/qmainwindow
parentc75c685280730e6a0e257ab2ede6f7266f2b70a1 (diff)
downloadQt-d7fac182fe090831ac5f9e70d0615aec298ff1e2.zip
Qt-d7fac182fe090831ac5f9e70d0615aec298ff1e2.tar.gz
Qt-d7fac182fe090831ac5f9e70d0615aec298ff1e2.tar.bz2
Autotest fix for QMainWindow
On embedded, the size of the screen is too small to leave enough space for the dock widgets.
Diffstat (limited to 'tests/auto/qmainwindow')
-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
+ }
}