summaryrefslogtreecommitdiff
path: root/src/search/searchengine.cpp
diff options
context:
space:
mode:
authorlionelc <megabigbug@yahoo.fr>2010-09-01 19:32:44 +0200
committerlionelc <megabigbug@yahoo.fr>2010-09-01 19:32:44 +0200
commit3e527d1d33fc147989942d03ee59497e6f3e42d0 (patch)
tree5c398b70f754e6c48b5c05e3c50ce5b667930951 /src/search/searchengine.cpp
parentThis should improve adblock retrieving by NOT asking for SSL confirmations (diff)
downloadrekonq-3e527d1d33fc147989942d03ee59497e6f3e42d0.tar.xz
big commit: fix fast typing
Diffstat (limited to 'src/search/searchengine.cpp')
-rw-r--r--src/search/searchengine.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/search/searchengine.cpp b/src/search/searchengine.cpp
index 38f063a4..8eecfa52 100644
--- a/src/search/searchengine.cpp
+++ b/src/search/searchengine.cpp
@@ -136,6 +136,19 @@ KService::Ptr SearchEngine::fromString(QString text)
}
+QString SearchEngine::extractQuery(QString text)
+{
+ QString query = text;
+ KService::Ptr engine = SearchEngine::fromString(text);
+ if (engine)
+ {
+ query = query.remove(0, text.indexOf(SearchEngine::delimiter()) + 1);
+ }
+
+ return query;
+}
+
+
QString SearchEngine::buildQuery(KService::Ptr engine, QString text)
{
QString query = engine->property("Query").toString();