From 1b49180a0cd77cc4df7aafda482192f3b449270f Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 3 Apr 2009 17:12:53 +0000 Subject: [PATCH] Trim the query term to avoid leading (or following) whitespace BUG: 188665 svn path=/trunk/KDE/kdelibs/; revision=948747 --- runnermanager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index b511920b1..4b319299a 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -326,8 +326,10 @@ void RunnerManager::launchQuery(const QString &term) launchQuery(term, QString()); } -void RunnerManager::launchQuery(const QString &term, const QString &runnerName) +void RunnerManager::launchQuery(const QString &untrimmedTerm, const QString &runnerName) { + QString term = untrimmedTerm.trimmed(); + if (d->runners.isEmpty()) { d->loadRunners(); } @@ -379,8 +381,10 @@ bool RunnerManager::execQuery(const QString &term) return execQuery(term, QString()); } -bool RunnerManager::execQuery(const QString &term, const QString &runnerName) +bool RunnerManager::execQuery(const QString &untrimmedTerm, const QString &runnerName) { + QString term = untrimmedTerm.trimmed(); + if (d->runners.isEmpty()) { d->loadRunners(); }