Do not reset model while changing the regexp

There is no need to do so, QSortFilterProxyModel correctly adjust rows

REVIEW: 105042
This commit is contained in:
Aurélien Gâteau 2012-05-25 14:33:34 +02:00
parent f145e1de8e
commit 0ddb12cf96

View File

@ -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