summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2011-12-20 12:56:01 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-02 16:43:02 +0100
commitf29e55448b8e0c0a156e3af960589c6733cc4d7d (patch)
tree68ace1683067cea9895fa8171cd8c56ef77e47fb /src/corelib/itemmodels
parenta23a5487eb60c0f8b3c99d32a5e8e3cf636e4911 (diff)
Change the default value of QSortFilterProxyModel::dynamicSortFilter
The value is changed to true. It is a common bug that developers expect this proxy model to reflect the source model when the source changes. That requires setDynamicSortFilter(true), so we change the default to optimize for the common case. Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 4a9c100613..085ade1680 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -1528,7 +1528,7 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
or vice versa, use mapToSource(), mapFromSource(), mapSelectionToSource(),
and mapSelectionFromSource().
- \note By default, the model does not dynamically re-sort and re-filter data
+ \note By default, the model dynamically re-sorts and re-filters data
whenever the original model changes. This behavior can be changed by
setting the \l{QSortFilterProxyModel::dynamicSortFilter}{dynamicSortFilter}
property.
@@ -1657,7 +1657,7 @@ QSortFilterProxyModel::QSortFilterProxyModel(QObject *parent)
d->sort_localeaware = false;
d->filter_column = 0;
d->filter_role = Qt::DisplayRole;
- d->dynamic_sortfilter = false;
+ d->dynamic_sortfilter = true;
connect(this, SIGNAL(modelReset()), this, SLOT(_q_clearMapping()));
}
@@ -2402,7 +2402,7 @@ void QSortFilterProxyModel::setFilterFixedString(const QString &pattern)
call \l{QSortFilterProxyModel::}{sort()} after adding items to the
QComboBox.
- The default value is false.
+ The default value is true.
*/
bool QSortFilterProxyModel::dynamicSortFilter() const
{