diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-10-06 04:55:34 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-10-06 07:32:37 (GMT) |
commit | b1310cb8fcc4b48750f82502a7140f2ebb8a44c7 (patch) | |
tree | e81a870a4f9a562cd390a9461c12d300e0c6341e /tests/auto/qabstractitemview/tst_qabstractitemview.cpp | |
parent | fdc233d73f40489b9084b5acaf3148d2133689ee (diff) | |
download | Qt-b1310cb8fcc4b48750f82502a7140f2ebb8a44c7.zip Qt-b1310cb8fcc4b48750f82502a7140f2ebb8a44c7.tar.gz Qt-b1310cb8fcc4b48750f82502a7140f2ebb8a44c7.tar.bz2 |
fix tst_QAbstractItemView::task250754_fontChange for Windows CE
We need to give Windows mobile some more time to handle all internal
timer events. Otherwise QTreeView::updateScrollBars doesn't get called.
Reviewed-by: mauricek
Diffstat (limited to 'tests/auto/qabstractitemview/tst_qabstractitemview.cpp')
-rw-r--r-- | tests/auto/qabstractitemview/tst_qabstractitemview.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index d3af076..1a9a5f9 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -181,6 +181,10 @@ public: virtual ~tst_QAbstractItemView(); void basic_tests(TestView *view); +public slots: + void initTestCase(); + void cleanupTestCase(); + private slots: void getSetCheck(); void emptyModels_data(); @@ -312,6 +316,17 @@ tst_QAbstractItemView::~tst_QAbstractItemView() { } +void tst_QAbstractItemView::initTestCase() +{ +#ifdef Q_OS_WINCE_WM + qApp->setAutoMaximizeThreshold(-1); +#endif +} + +void tst_QAbstractItemView::cleanupTestCase() +{ +} + void tst_QAbstractItemView::emptyModels_data() { QTest::addColumn<QString>("viewType"); @@ -1186,15 +1201,12 @@ void tst_QAbstractItemView::task250754_fontChange() QFont font = tree.font(); font.setPointSize(5); tree.setFont(font); - QTest::qWait(30); - - QVERIFY(!tree.verticalScrollBar()->isVisible()); + QTRY_VERIFY(!tree.verticalScrollBar()->isVisible()); font.setPointSize(45); tree.setFont(font); - QTest::qWait(30); //now with the huge items, the scrollbar must be visible - QVERIFY(tree.verticalScrollBar()->isVisible()); + QTRY_VERIFY(tree.verticalScrollBar()->isVisible()); qApp->setStyleSheet(app_css); } |