diff options
-rw-r--r-- | src/webview.cpp | 9 | ||||
-rw-r--r-- | src/webview.h | 2 |
2 files changed, 11 insertions, 0 deletions
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; |