diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-04-14 16:48:02 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-15 22:07:53 (GMT) |
commit | 7c49be8d8053532bd4c42eff4536c18366f8208a (patch) | |
tree | 691e1647485a19cdd21dc3452128a953e1d8d468 /src | |
parent | 53297e17ee5cd602078d1fdcb51b6b326e46a4a5 (diff) | |
download | Qt-7c49be8d8053532bd4c42eff4536c18366f8208a.zip Qt-7c49be8d8053532bd4c42eff4536c18366f8208a.tar.gz Qt-7c49be8d8053532bd4c42eff4536c18366f8208a.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
(cherry picked from commit fd5f83e612729cebc5395c992bd98628bb9ea25f)
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 7cef88f..e49f40a 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)) |