summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-04-07 11:44:20 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-04-07 12:21:02 (GMT)
commit2883580a3e10df16789ba1c9ee67507e508b95c1 (patch)
tree73b1986c6287e0d5d1aebe6047c467de29ade964 /tests
parent7be934e98dd75d2c8902df4e88e2a1aceab9789f (diff)
downloadQt-2883580a3e10df16789ba1c9ee67507e508b95c1.zip
Qt-2883580a3e10df16789ba1c9ee67507e508b95c1.tar.gz
Qt-2883580a3e10df16789ba1c9ee67507e508b95c1.tar.bz2
QTableView: fix spans corruption when removing spans.
- We should not do -1 after erasing, as it is done later on. - We should consider the 0 height even if it is not the last span. - Added an assert. Task-number: QTBUG-9631 Reviewed-by: Gabriel
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 54e32218..2062e8e 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -3035,6 +3035,14 @@ void tst_QTableView::spans_data()
<< QPoint(0, 0)
<< 1
<< 1;
+
+ QTest::newRow("QTBUG-9631: remove one span")
+ << 10 << 10
+ << (SpanList() << QRect(1, 1, 2, 1) << QRect(2, 2, 2, 2) << QRect(1, 1, 1, 1))
+ << false
+ << QPoint(1, 1)
+ << 1
+ << 1;
}
void tst_QTableView::spans()