summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-02-27 18:14:27 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-02-27 18:14:27 +0100
commit4c83b7649ffac3d47c5cb9ce697139d34bb828eb (patch)
treeead9307bf66c476298d808b7292b2cd4424dde5b
parentFix search management (diff)
downloadrekonq-4c83b7649ffac3d47c5cb9ce697139d34bb828eb.tar.xz
Properly manage open in new tab/window selected urls
-rw-r--r--src/webtab/webview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index e7275db2..c6aa94e6 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -479,13 +479,13 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
// open selected text url in a new tab
QAction * const openInNewTabAction = new KAction(KIcon("tab-new"),
i18n("Open '%1' in New Tab", truncatedUrl), &menu);
- openInNewTabAction->setData(QUrl(urlLikeText));
+ openInNewTabAction->setData( QUrl::fromUserInput(selectedText()) );
connect(openInNewTabAction, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewTab()));
menu.addAction(openInNewTabAction);
//open selected text url in a new window
QAction * const openInNewWindowAction = new KAction(KIcon("window-new"),
i18n("Open '%1' in New Window", truncatedUrl), &menu);
- openInNewWindowAction->setData(QUrl(urlLikeText));
+ openInNewWindowAction->setData( QUrl::fromUserInput(selectedText()) );
connect(openInNewWindowAction, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewWindow()));
menu.addAction(openInNewWindowAction);
menu.addSeparator();