summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlistview
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2011-04-12 06:32:06 (GMT)
committerSami Merila <sami.merila@nokia.com>2011-04-12 06:32:06 (GMT)
commitcd19ab9f306f777b495cceabaf57a6eeaf86a82a (patch)
tree773b9b53f846c038ccf6997dd7c5ab62fc2a814b /tests/auto/qlistview
parent0f7a4790bb0e3435a02f8751a29dc06c1f88d8d5 (diff)
downloadQt-cd19ab9f306f777b495cceabaf57a6eeaf86a82a.zip
Qt-cd19ab9f306f777b495cceabaf57a6eeaf86a82a.tar.gz
Qt-cd19ab9f306f777b495cceabaf57a6eeaf86a82a.tar.bz2
Two QListView autotests do not pass on Symbian^3 releases
tst_QListView::taskQTBUG_2678_spacingAndWrappedText() fails because: QS60Style adds to the itemview item content size margins and empty space, which shouldn't be part of the content size. As a fix, remove these. taskQTBUG_435_deselectOnViewportClick() fails because: Sending a click to a selected itemview item, when it should be sent to below that specific one. It was using hardcoded (center + 20) and autotest assumed that this would be outside of first item. In S60 with touch support, the itemview items are rather tall (49 pixels). As a fix, autotest now uses calculated value, which ensures that click is sent to outside first item. Task-number: QT-4810 Reviewed-by: Tomi Vihria
Diffstat (limited to 'tests/auto/qlistview')
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index b6e69a0..ee03386 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -1893,7 +1893,8 @@ void tst_QListView::taskQTBUG_435_deselectOnViewportClick()
QCOMPARE(view.selectionModel()->selectedIndexes().count(), model.rowCount());
- QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, 20);
+ const QRect itemRect = view.visualRect(model.index(model.rowCount() - 1));
+ QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, itemRect.height());
//first the left button
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p);
QVERIFY(!view.selectionModel()->hasSelection());