Trim the query term to avoid leading (or following) whitespace

BUG: 188665

svn path=/trunk/KDE/kdelibs/; revision=948747
This commit is contained in:
Jacopo De Simoi 2009-04-03 17:12:53 +00:00
parent 339c9cbf9a
commit 1b49180a0c

View File

@ -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();
}