From ca917ecc5a7b3fc69fcb5682466c421d56627aec Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 23 May 2009 01:42:26 +0200 Subject: Initial kdewebkit porting. STEP 1 DONE --- src/mainview.cpp | 2 +- src/webpage.cpp | 4 ++-- src/webview.cpp | 6 ++++++ src/webview.h | 3 +++ 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mainview.cpp b/src/mainview.cpp index 8f35fdd8..8f3bf197 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -658,7 +658,7 @@ void MainView::loadUrl(const KUrl &url) if (webView) { -// webView->load(loadingUrl,0L,0L); FIXME NOW!! + webView->load(loadingUrl); webView->setFocus(); } } diff --git a/src/webpage.cpp b/src/webpage.cpp index 5fae4be3..51a02771 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -147,7 +147,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r { webView = Application::instance()->newWebView(); webView->setFocus(); -// webView->load(request); FIXME NOW!! + webView->load(request.url()); m_keyboardModifiers = Qt::NoModifier; m_pressedButtons = Qt::NoButton; return false; @@ -165,7 +165,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r { webView = Application::instance()->newWebView(); webView->setFocus(); -// webView->load(request); FIXME NOW!! + webView->load(request.url()); return false; } } diff --git a/src/webview.cpp b/src/webview.cpp index 2f9e794e..a635adb7 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -80,6 +80,12 @@ WebView::WebView(QWidget* parent) } +void WebView::load(const KUrl &url) +{ + QWebView::load(url); +} + + void WebView::contextMenuEvent(QContextMenuEvent *event) { QWebHitTestResult result = page()->mainFrame()->hitTestContent(event->pos()); diff --git a/src/webview.h b/src/webview.h index cef46a80..d2dc2bad 100644 --- a/src/webview.h +++ b/src/webview.h @@ -64,6 +64,9 @@ public: QString lastStatusBarText() const { return m_statusBarText; } int progress() const { return m_progress; } +public Q_SLOTS: + void load(const KUrl &url); + signals: // switching tabs void ctrlTabPressed(); -- cgit v1.2.1