summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 5cc3b460..065c0ef2 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -42,6 +42,7 @@
#include "urlbar.h"
#include "sessionmanager.h"
#include "adblockmanager.h"
+#include "opensearchmanager.h"
#include "webview.h"
#include "filterurljob.h"
#include "tabbar.h"
@@ -64,6 +65,7 @@ QWeakPointer<HistoryManager> Application::s_historyManager;
QWeakPointer<BookmarkProvider> Application::s_bookmarkProvider;
QWeakPointer<SessionManager> Application::s_sessionManager;
QWeakPointer<AdBlockManager> Application::s_adblockManager;
+QWeakPointer<OpenSearchManager> Application::s_opensearchManager;
Application::Application()
@@ -98,6 +100,9 @@ Application::~Application()
delete s_adblockManager.data();
s_adblockManager.clear();
+
+ delete s_opensearchManager.data();
+ s_opensearchManager.clear();
}
@@ -315,6 +320,17 @@ SessionManager *Application::sessionManager()
}
+OpenSearchManager *Application::opensearchManager()
+{
+ if (s_opensearchManager.isNull())
+ {
+ s_opensearchManager = new OpenSearchManager(instance());
+ s_opensearchManager.data()->setSearchProvider("google"); //TODO: use other suggestion engines
+ }
+ return s_opensearchManager.data();
+}
+
+
KIcon Application::icon(const KUrl &url)
{
// avoid infinite loop at startup