summaryrefslogtreecommitdiff
path: root/src/webtab/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-09-25 18:02:23 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commit02d9b5fe590303e540c1ff9111e0cfe3194f7e7d (patch)
treef2515238feb6593efc89621805046cca4d24b968 /src/webtab/webview.cpp
parentDon't overwrite downloads by default (diff)
downloadrekonq-02d9b5fe590303e540c1ff9111e0cfe3194f7e7d.tar.xz
New Private Browsing mode :D
Diffstat (limited to 'src/webtab/webview.cpp')
-rw-r--r--src/webtab/webview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index 618edf3c..e8b629ec 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -368,6 +368,11 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewWindow()));
menu.addAction(a);
+ a = new KAction(KIcon("view-media-artist"), i18n("Open in Private &Window"), this);
+ a->setData(m_contextMenuHitResult.linkUrl());
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInPrivateWindow()));
+ menu.addAction(a);
+
menu.addSeparator();
// Don't show dots if we are NOT going to ask for download path
@@ -741,6 +746,13 @@ void WebView::openLinkInNewTab()
emit loadUrl(url, Rekonq::NewTab);
}
+void WebView::openLinkInPrivateWindow()
+{
+ KAction *a = qobject_cast<KAction*>(sender());
+ KUrl url(a->data().toUrl());
+
+ emit loadUrl(url, Rekonq::NewPrivateWindow);
+}
void WebView::bookmarkLink()
{