Mor ework on trying to speedup Jamendo - it can still be *very* slow though :-(

This commit is contained in:
craig.p.drummond
2013-07-15 19:15:56 +00:00
committed by craig.p.drummond
parent 28d385586a
commit 6add6309bb
5 changed files with 13 additions and 8 deletions

View File

@@ -77,24 +77,23 @@ bool ProxyModel::update(const QString &text, const QString &genre)
if (text.length()<2 && genre.isEmpty()) {
if (filterEnabled) {
// bool wasEmpty=isEmpty();
bool wasEmpty=isEmpty();
filterEnabled=false;
filterGenre=genre;
// if (!wasEmpty) {
if (!wasEmpty || !filterRegExp().isEmpty()) {
invalidate();
// }
// if (!filterRegExp().isEmpty()) {
// setFilterRegExp(QString());
// }
}
if (!filterRegExp().isEmpty()) {
setFilterRegExp(QString());
}
return true;
}
} else {
filterEnabled=true;
filterGenre=genre;
invalidate();
if (text!=filterRegExp().pattern()) {
setFilterRegExp(text);
} else {
invalidate();
}
return true;
}