summaryrefslogtreecommitdiffstats
path: root/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-06 04:55:34 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-06 07:32:37 (GMT)
commitb1310cb8fcc4b48750f82502a7140f2ebb8a44c7 (patch)
treee81a870a4f9a562cd390a9461c12d300e0c6341e /tests/auto/qabstractitemview/tst_qabstractitemview.cpp
parentfdc233d73f40489b9084b5acaf3148d2133689ee (diff)
downloadQt-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.cpp22
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);
}