diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-09-10 07:54:28 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-09-10 07:58:13 (GMT) |
commit | d7fac182fe090831ac5f9e70d0615aec298ff1e2 (patch) | |
tree | 7066ed66ae14b846d6e17cbc0d780bf77c59ac06 | |
parent | c75c685280730e6a0e257ab2ede6f7266f2b70a1 (diff) | |
download | Qt-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.
-rw-r--r-- | tests/auto/qmainwindow/tst_qmainwindow.cpp | 8 |
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 + } } |