summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qsortfilterproxymodel.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-05-04 18:15:35 +0200
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-05-05 15:38:03 +0200
commit78660bf18ec11e043f1c88d711f62d32237bd0e5 (patch)
tree545f1205a9aaa9cdf71d71a9020963d18a883909 /src/gui/itemviews/qsortfilterproxymodel.cpp
parentc1c7dbf2a066868503dfabcd7113856fa6d2e457 (diff)
QSortFilterProxyModel: Warning or assert failure
A mapping was being created after QStandardItem::dataChanged() signal, even though one of the item's ancestors was being filtered out by the filter proxy. This let the QSortFilterProxyModel in a unstable state, triggering warnings and failing asserts. This patch partialy reverts commit f4bce41c10988. Auto-test included. Reviewed-by: mbm Task-number: QTBUG-10287
Diffstat (limited to 'src/gui/itemviews/qsortfilterproxymodel.cpp')
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index dce5c6a706..b12cd45448 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -1099,7 +1099,7 @@ void QSortFilterProxyModelPrivate::_q_sourceDataChanged(const QModelIndex &sourc
if (!source_top_left.isValid() || !source_bottom_right.isValid())
return;
QModelIndex source_parent = source_top_left.parent();
- IndexMap::const_iterator it = create_mapping(source_parent);
+ IndexMap::const_iterator it = source_index_mapping.find(source_parent);
if (it == source_index_mapping.constEnd()) {
// Don't care, since we don't have mapping for this index
return;