avoid loading runners if the query is empty
svn path=/trunk/KDE/kdelibs/; revision=1029903
This commit is contained in:
parent
cd65144478
commit
df3892d06d
@ -404,15 +404,15 @@ void RunnerManager::launchQuery(const QString &untrimmedTerm, const QString &run
|
||||
setupMatchSession();
|
||||
QString term = untrimmedTerm.trimmed();
|
||||
|
||||
if (d->runners.isEmpty()) {
|
||||
d->loadRunners();
|
||||
}
|
||||
|
||||
if (term.isEmpty()) {
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (d->runners.isEmpty()) {
|
||||
d->loadRunners();
|
||||
}
|
||||
|
||||
if (d->context.query() == term) {
|
||||
// we already are searching for this!
|
||||
return;
|
||||
@ -459,15 +459,15 @@ bool RunnerManager::execQuery(const QString &untrimmedTerm, const QString &runne
|
||||
{
|
||||
QString term = untrimmedTerm.trimmed();
|
||||
|
||||
if (d->runners.isEmpty()) {
|
||||
d->loadRunners();
|
||||
}
|
||||
|
||||
if (term.isEmpty()) {
|
||||
reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (d->runners.isEmpty()) {
|
||||
d->loadRunners();
|
||||
}
|
||||
|
||||
if (d->context.query() == term) {
|
||||
// we already are searching for this!
|
||||
emit matchesChanged(d->context.matches());
|
||||
|
Loading…
Reference in New Issue
Block a user