summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtreeview
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-07 07:58:01 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-07 08:11:44 (GMT)
commitacc3a45f557253329fbb693fd112808a148f83f6 (patch)
tree9e6f7bafff65694b96d2619d6a31b410e50a33c4 /tests/auto/qtreeview
parent0648f93cce7b721b31b0bb11a91e332b56518cb0 (diff)
downloadQt-acc3a45f557253329fbb693fd112808a148f83f6.zip
Qt-acc3a45f557253329fbb693fd112808a148f83f6.tar.gz
Qt-acc3a45f557253329fbb693fd112808a148f83f6.tar.bz2
Stabilize QTreeView test
Diffstat (limited to 'tests/auto/qtreeview')
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index 6709807..fae4b26 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -2042,7 +2042,7 @@ void tst_QTreeView::scrollTo()
view.show();
view.setVerticalScrollMode(QAbstractItemView::ScrollPerItem); //some styles change that in Polish
-
+
view.resize(300, 200);
//view.verticalScrollBar()->setValue(0);
@@ -2055,7 +2055,7 @@ void tst_QTreeView::scrollTo()
QCOMPARE(view.verticalScrollBar()->value(), 5);
view.scrollTo(model.index(60, 60, QModelIndex()));
-
+
CHECK_VISIBLE(60,60);
view.scrollTo(model.index(60, 30, QModelIndex()));
CHECK_VISIBLE(60,30);
@@ -3059,12 +3059,12 @@ void tst_QTreeView::task216717_updateChildren()
tree.refreshed = false;
QTreeWidgetItem *parent = new QTreeWidgetItem(QStringList() << "parent");
tree.addTopLevelItem(parent);
- QTest::qWait(100);
- QVERIFY(tree.refreshed);
+ QTest::qWait(10);
+ QTRY_VERIFY(tree.refreshed);
tree.refreshed = false;
parent->addChild(new QTreeWidgetItem(QStringList() << "child"));
- QTest::qWait(100);
- QVERIFY(tree.refreshed);
+ QTest::qWait(10);
+ QTRY_VERIFY(tree.refreshed);
}
@@ -3259,7 +3259,7 @@ void tst_QTreeView::task202039_closePersistentEditor()
view.closePersistentEditor(current);
QVERIFY(view.indexWidget(current) == 0);
- //here was the bug: closing the persistent editor would not reset the state
+ //here was the bug: closing the persistent editor would not reset the state
//and it was impossible to go into editinon again
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.visualRect(current).center());
QTest::mouseDClick(view.viewport(), Qt::LeftButton, 0, view.visualRect(current).center());
@@ -3313,7 +3313,7 @@ void tst_QTreeView::task244304_clickOnDecoration()
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, rect.topLeft()+QPoint(-rect.left()/2,rect.height()/2));
QVERIFY(!view.currentIndex().isValid());
QVERIFY(view.isExpanded(item0.index()));
-
+
rect = view.visualRect(item1.index());
//the item has no decoration, it should get selected
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, rect.topLeft()+QPoint(-rect.left()/2,rect.height()/2));