delay the reset signal after a setFilterRegExp: seems to make views behave a bit better:

avoids "holes" and some crash

svn path=/trunk/KDE/kdebase/runtime/; revision=1204228
This commit is contained in:
Marco Martin 2010-12-06 13:28:45 +00:00
parent 7accddda53
commit 1dcc19c800

View File

@ -80,7 +80,11 @@ 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
blockSignals(true);
QSortFilterProxyModel::setFilterRegExp(QRegExp(exp, Qt::CaseInsensitive));
blockSignals(false);
reset();
}
QString SortFilterModel::filterRegExp() const