diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-02-24 15:55:15 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-02-24 16:14:40 (GMT) |
commit | 77670c3c0fdc3021356e212e94042a0b5a4f4f8c (patch) | |
tree | 2c8535746651ace0394073697b0cc08fb7f90cb6 /tests | |
parent | ec646b00cb485e2fa0d47ec4d5ffaf9a0fcf9ca6 (diff) | |
download | Qt-77670c3c0fdc3021356e212e94042a0b5a4f4f8c.zip Qt-77670c3c0fdc3021356e212e94042a0b5a4f4f8c.tar.gz Qt-77670c3c0fdc3021356e212e94042a0b5a4f4f8c.tar.bz2 |
Expand indicator would not be displayed after removal of a collapsed item's child
While setting the hasChildren property of QTreeViewItem, "collapsed" and
"not visible" were being mistaken.
Auto-test included.
Reviewed-by: Olivier
Task-number: QTBUG-7443
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtreeview/tst_qtreeview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index fd4815e..e39cf6c 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -3083,6 +3083,20 @@ void tst_QTreeView::styleOptionViewItem() QApplication::processEvents(); QTRY_VERIFY(delegate.count >= 3); QApplication::processEvents(); + + item00->setText("OnlyOne"); + item0->insertRow(2, new QStandardItem("OnlyOne Last")); + view.collapse(item0->index()); + item0->removeRow(0); + delegate.count = 0; + QTRY_VERIFY(delegate.count >= 2); + QApplication::processEvents(); + + item0->removeRow(1); + item0->setText("OnlyOne"); + delegate.count = 0; + QTRY_VERIFY(delegate.count >= 2); + QApplication::processEvents(); } } |