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();
|
setupMatchSession();
|
||||||
QString term = untrimmedTerm.trimmed();
|
QString term = untrimmedTerm.trimmed();
|
||||||
|
|
||||||
if (d->runners.isEmpty()) {
|
|
||||||
d->loadRunners();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (term.isEmpty()) {
|
if (term.isEmpty()) {
|
||||||
reset();
|
reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d->runners.isEmpty()) {
|
||||||
|
d->loadRunners();
|
||||||
|
}
|
||||||
|
|
||||||
if (d->context.query() == term) {
|
if (d->context.query() == term) {
|
||||||
// we already are searching for this!
|
// we already are searching for this!
|
||||||
return;
|
return;
|
||||||
@ -459,15 +459,15 @@ bool RunnerManager::execQuery(const QString &untrimmedTerm, const QString &runne
|
|||||||
{
|
{
|
||||||
QString term = untrimmedTerm.trimmed();
|
QString term = untrimmedTerm.trimmed();
|
||||||
|
|
||||||
if (d->runners.isEmpty()) {
|
|
||||||
d->loadRunners();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (term.isEmpty()) {
|
if (term.isEmpty()) {
|
||||||
reset();
|
reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d->runners.isEmpty()) {
|
||||||
|
d->loadRunners();
|
||||||
|
}
|
||||||
|
|
||||||
if (d->context.query() == term) {
|
if (d->context.query() == term) {
|
||||||
// we already are searching for this!
|
// we already are searching for this!
|
||||||
emit matchesChanged(d->context.matches());
|
emit matchesChanged(d->context.matches());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user