summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-11-12 03:16:15 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-11-13 02:51:47 +0100
commitfc7a75bb35a60060a1b8c103cbe352b5c5ef6635 (patch)
treee5d2f2fd385db77b26b86b1373bcae43863e8a14 /src
parentFixes and improvements in rekonq web classes (diff)
downloadrekonq-fc7a75bb35a60060a1b8c103cbe352b5c5ef6635.tar.xz
Connecting new KWebView signals to some proper slots
Diffstat (limited to 'src')
-rw-r--r--src/webview.cpp9
-rw-r--r--src/webview.h2
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;