From c1c51dd4f7002bedee996e498d3333e5eabf2ddc Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 14 Nov 2011 14:10:59 +1000 Subject: 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 --- tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- cgit v1.2.3