summaryrefslogtreecommitdiff
path: root/src/opensearch/searchengine.h
diff options
context:
space:
mode:
authorAndreas Hartmetz <ahartmetz@gmail.com>2010-11-29 22:05:39 +0100
committerAndreas Hartmetz <ahartmetz@gmail.com>2010-11-29 22:05:39 +0100
commit4ba011f9465ad0067c93c39c19638a80807b5183 (patch)
tree30dfafcf0c951ffc92b193d6c50692d9a4e7e2f3 /src/opensearch/searchengine.h
parentMy kuriikwsfilterrc contains no default search engine, so (diff)
downloadrekonq-4ba011f9465ad0067c93c39c19638a80807b5183.tar.xz
Port SearchEngine from somewhat unsafe "naked" static variables to
K_GLOBAL_STATIC(), which is Perfectly Safe ;) Acked-by Jon.
Diffstat (limited to 'src/opensearch/searchengine.h')
-rw-r--r--src/opensearch/searchengine.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/opensearch/searchengine.h b/src/opensearch/searchengine.h
index d813666b..45077f03 100644
--- a/src/opensearch/searchengine.h
+++ b/src/opensearch/searchengine.h
@@ -38,22 +38,15 @@
#include <QString>
-class SearchEngine
+namespace SearchEngine
{
-public:
- static void reload();
- static QString delimiter();
- static KService::Ptr defaultEngine();
- static KService::List favorites();
- static KService::Ptr fromString(const QString &text);
- static QString buildQuery(KService::Ptr engine, const QString &text);
- static QString extractQuery(const QString &text);
-
-private:
- static bool m_loaded;
- static QString m_delimiter;
- static KService::List m_favorites;
- static KService::Ptr m_defaultEngine;
+void reload();
+QString delimiter();
+KService::Ptr defaultEngine();
+KService::List favorites();
+KService::Ptr fromString(const QString &text);
+QString buildQuery(KService::Ptr engine, const QString &text);
+QString extractQuery(const QString &text);
};
#endif