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 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/webview.cpp') 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 -- cgit v1.2.1