diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-11-14 14:10:59 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-15 04:31:55 +0100 |
commit | c1c51dd4f7002bedee996e498d3333e5eabf2ddc (patch) | |
tree | 19aa848e599e79a91ddf7aac87eccefe10f33e31 /tests/auto | |
parent | 191646001524c82f8a5216b033eb45fff46f580f (diff) |
Avoid crash in QColumnView autotest.
When combined with http://codereview.qt-project.org/8644, the test
crashes. This appears to be due to a column of the view being deleted
in response to calling setCurrentIndex(), as documented in QTBUG-22707.
This commit must be merged at the same time as
http://codereview.qt-project.org/8644.
Task-number: QTBUG-22707
Change-Id: I075be7df5d9196e37e2286e61d317086a76a167d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp index 82fe134fb7..e7a1a7092f 100644 --- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp +++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp @@ -976,6 +976,11 @@ void tst_QColumnView::parentCurrentIndex() QTest::qWait(ANIMATION_DELAY); QTRY_COMPARE(view.createdColumns[0]->currentIndex(), first); QTRY_COMPARE(view.createdColumns[1]->currentIndex(), second); + + // The next two lines should be removed when QTBUG-22707 is resolved. + QEXPECT_FAIL("", "QTBUG-22707", Abort); + QVERIFY(view.createdColumns[2]); + QTRY_COMPARE(view.createdColumns[2]->currentIndex(), third); } |