diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-04-14 16:48:02 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-04-15 08:57:38 (GMT) |
commit | fd5f83e612729cebc5395c992bd98628bb9ea25f (patch) | |
tree | da1f07a97536b6ea306fda3e545693483b989b7c /src | |
parent | 4626232ff040ce0e66e8cdf5ceb7d725c04a4823 (diff) | |
download | Qt-fd5f83e612729cebc5395c992bd98628bb9ea25f.zip Qt-fd5f83e612729cebc5395c992bd98628bb9ea25f.tar.gz Qt-fd5f83e612729cebc5395c992bd98628bb9ea25f.tar.bz2 |
Fixes QSortFilterProxyModel not reporting child if the model need to fetchMore
QSortFilterProxyModel::hasChildren need to construct the mapping. And when it
tries to construct the mapping, it needs to fetch the childs, so there is none.
Task-number: 250023
Reviewed-by: Marius Bugge Monsen
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/itemviews/qsortfilterproxymodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index 10bcb9a..b0137d2 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -274,6 +274,9 @@ IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping( Mapping *m = new Mapping; + if (model->canFetchMore(source_parent)) + model->fetchMore(source_parent); + int source_rows = model->rowCount(source_parent); for (int i = 0; i < source_rows; ++i) { if (q->filterAcceptsRow(i, source_parent)) |