diff options
Diffstat (limited to 'src/searchengine.cpp')
-rw-r--r-- | src/searchengine.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/searchengine.cpp b/src/searchengine.cpp index b4a96cd9..cfe84a69 100644 --- a/src/searchengine.cpp +++ b/src/searchengine.cpp @@ -31,7 +31,6 @@ //KDE includes #include <KConfigGroup> #include <KServiceTypeTrader> -#include <KUriFilter> #include <QStringList> @@ -150,20 +149,11 @@ KService::Ptr SearchEngine::fromString(const QString &text) } -QString SearchEngine::buildQuery(const QString &text) -{ - QString query = text; - KUriFilter::self()->filterUri(query, QStringList()); - - return query; -} - - QString SearchEngine::buildQuery(KService::Ptr engine, const QString &text) { if (!engine) return QString(); - - QString query = engine->property("Keys").toStringList().at(0) + SearchEngine::delimiter() + text; - return buildQuery(query); + QString query = engine->property("Query").toString(); + query = query.replace("\\{@}", KUrl::toPercentEncoding(text)); + return query; } |