From 0ddb12cf96dc101fc3302d4db1eaea49df432efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Fri, 25 May 2012 14:33:34 +0200 Subject: [PATCH] Do not reset model while changing the regexp There is no need to do so, QSortFilterProxyModel correctly adjust rows REVIEW: 105042 --- declarativeimports/core/datamodel.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/declarativeimports/core/datamodel.cpp b/declarativeimports/core/datamodel.cpp index 97d129e5d..b41de1cd5 100644 --- a/declarativeimports/core/datamodel.cpp +++ b/declarativeimports/core/datamodel.cpp @@ -82,12 +82,7 @@ void SortFilterModel::setModel(QObject *source) void SortFilterModel::setFilterRegExp(const QString &exp) { - //FIXME: this delaying of the reset signal seems to make the views behave a bit better, i.e. less holes and avoids some crashes, in theory shouldn't be necessary - beginResetModel(); - blockSignals(true); QSortFilterProxyModel::setFilterRegExp(QRegExp(exp, Qt::CaseInsensitive)); - blockSignals(false); - endResetModel(); } QString SortFilterModel::filterRegExp() const