summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2012-03-21 10:51:56 (GMT)
committerChristian Franke <nobody@nowhere.ws>2012-03-21 10:51:56 (GMT)
commitc483d3e895de888a65488d6a15818c376074fcdc (patch)
tree1c7917d150f9c62e8088c9aa48d4ab55d6eaa96e
parent160583f8f349388c24ea9d7a83e2b54d9dbb3be3 (diff)
make WebView an OpenSearchEngineDelegate
-rw-r--r--src/webview.cpp9
-rw-r--r--src/webview.h6
2 files changed, 14 insertions, 1 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 43eeeb9..2c9b046 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -592,6 +592,15 @@ void WebView::loadUrl(const QUrl &url, const QString &title)
load(url);
}
+void WebView::performSearchRequest(const QNetworkRequest &request,
+ QNetworkAccessManager::Operation operation,
+ const QByteArray &data)
+{
+ emit titleChanged(tr("Loading..."));
+ load(request, operation, data);
+}
+
+
QString WebView::lastStatusBarText() const
{
return m_statusBarText;
diff --git a/src/webview.h b/src/webview.h
index 6349a5c..f4a7447 100644
--- a/src/webview.h
+++ b/src/webview.h
@@ -67,6 +67,7 @@
#include <qwebview.h>
#include "tabwidget.h"
+#include "opensearchenginedelegate.h"
#if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)
#include <qwebelement.h>
@@ -76,7 +77,7 @@ class QLabel;
class BrowserMainWindow;
class TabWidget;
class WebPage;
-class WebView : public QWebView
+class WebView : public QWebView, public OpenSearchEngineDelegate
{
Q_OBJECT
@@ -95,6 +96,9 @@ public:
#endif
void loadUrl(const QUrl &url, const QString &title = QString());
+ void performSearchRequest(const QNetworkRequest &request,
+ QNetworkAccessManager::Operation operation,
+ const QByteArray &data);
QUrl url() const;
QString lastStatusBarText() const;