summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsortfilterproxymodel
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-16 19:56:00 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-04-27 15:52:06 +0200
commitf328a68d898ebe74897132e3dae1ce75de496d3b (patch)
tree90bb4ddea90df6380c6a00849d35a16b9f810d00 /tests/auto/qsortfilterproxymodel
parent1c49081e9724db666070305bb57f829076a718fe (diff)
QSortFilterProxyModel: remove the mapping of the child that are filtered away
when the filter change Task-Number: relates to 251296 Reviewed-by: Marius Bugge Monsen
Diffstat (limited to 'tests/auto/qsortfilterproxymodel')
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 18aa5fca1a..ea73a5e194 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -2715,6 +2715,16 @@ void tst_QSortFilterProxyModel::task251296_hiddenChildren()
QCOMPARE(proxy.rowCount(indexA) , 1);
QModelIndex indexC = proxy.index(0, 0, indexA);
QCOMPARE(proxy.data(indexC).toString(), QString::fromLatin1("C VISIBLE"));
+
+ proxy.setFilterRegExp("C");
+ QCOMPARE(proxy.rowCount(QModelIndex()), 0);
+ itemC->setText("invisible");
+ itemA->setText("AC");
+
+ QCOMPARE(proxy.rowCount(QModelIndex()), 1);
+ indexA = proxy.index(0,0);
+ QCOMPARE(proxy.data(indexA).toString(), QString::fromLatin1("AC"));
+ QCOMPARE(proxy.rowCount(indexA) , 0);
}