From df3892d06dda4333411ee2a1ba85b8de2c7a8194 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 1 Oct 2009 00:58:24 +0000 Subject: [PATCH] avoid loading runners if the query is empty svn path=/trunk/KDE/kdelibs/; revision=1029903 --- runnermanager.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index 0441863dd..fd564d03d 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -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());