summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-16 17:56:00 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-04-27 13:52:06 (GMT)
commitf328a68d898ebe74897132e3dae1ce75de496d3b (patch)
tree90bb4ddea90df6380c6a00849d35a16b9f810d00 /tests
parent1c49081e9724db666070305bb57f829076a718fe (diff)
downloadQt-f328a68d898ebe74897132e3dae1ce75de496d3b.zip
Qt-f328a68d898ebe74897132e3dae1ce75de496d3b.tar.gz
Qt-f328a68d898ebe74897132e3dae1ce75de496d3b.tar.bz2
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')
-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 18aa5fc..ea73a5e 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);
}