summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/searchengine.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/searchengine.cpp b/src/searchengine.cpp
index cfe84a69..dd01f703 100644
--- a/src/searchengine.cpp
+++ b/src/searchengine.cpp
@@ -31,6 +31,7 @@
//KDE includes
#include <KConfigGroup>
#include <KServiceTypeTrader>
+#include <KUriFilter>
#include <QStringList>
@@ -153,7 +154,13 @@ QString SearchEngine::buildQuery(KService::Ptr engine, const QString &text)
{
if (!engine)
return QString();
- QString query = engine->property("Query").toString();
- query = query.replace("\\{@}", KUrl::toPercentEncoding(text));
+
+ QString shortcut = engine->property("Keys").toStringList().at(0);
+ QString query = shortcut + delimiter() + text;
+
+ QStringList filters;
+ filters << QL1S("kurisearchfilter");
+ KUriFilter::self()->filterUri(query, filters);
+
return query;
}