summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-20 19:30:26 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-20 19:30:26 +0200
commitaa05bd3973a2f39f50c14314840f0fe078f16444 (patch)
treedd21ae094321ca9f0b803379ad7e93a6b065ec10 /src/application.cpp
parentbk toolbar by default for the next rekonq. (diff)
parentChange from QByteArray to QString in the right way (diff)
downloadrekonq-aa05bd3973a2f39f50c14314840f0fe078f16444.tar.xz
Merge branch 'opensearch'
Conflicts: src/CMakeLists.txt src/urlbar/urlresolver.cpp
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