From fc7a75bb35a60060a1b8c103cbe352b5c5ef6635 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 12 Nov 2009 03:16:15 +0100 Subject: Connecting new KWebView signals to some proper slots --- src/webview.cpp | 9 +++++++++ src/webview.h | 2 ++ 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/webview.cpp b/src/webview.cpp index b4b71f64..2c96f532 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -64,6 +64,8 @@ WebView::WebView(QWidget* parent) connect(page(), SIGNAL(statusBarMessage(const QString&)), this, SLOT(setStatusBarText(const QString&))); connect(this, SIGNAL(loadProgress(int)), this, SLOT(updateProgress(int))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); + + connect(this, SIGNAL(linkMiddleOrCtrlClicked(const KUrl &)), this, SLOT(loadInNewTab(const KUrl &)) ); } @@ -419,3 +421,10 @@ void WebView::keyPressEvent(QKeyEvent *event) QWebView::keyPressEvent(event); } + + +void WebView::loadInNewTab(const KUrl &url) +{ + Application::instance()->loadUrl(url, Rekonq::NewCurrentTab); +} + \ No newline at end of file diff --git a/src/webview.h b/src/webview.h index a753736c..e4a0cc59 100644 --- a/src/webview.h +++ b/src/webview.h @@ -71,6 +71,8 @@ private slots: void openLinkInNewWindow(); void openLinkInNewTab(); + void loadInNewTab(const KUrl &url); + private: WebPage *m_page; int m_progress; -- cgit v1.2.1