summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-28 14:50:21 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-28 14:50:21 +0200
commit7a7c3efc202db2bbcbb18b48ce9458628b4a68bb (patch)
tree51a8633ea4bdc0fd76237936707b71a4fae6ee4c /src/webview.cpp
parentcleaning mainview code (unuseful method) (diff)
downloadrekonq-7a7c3efc202db2bbcbb18b48ce9458628b4a68bb.tar.xz
Krazy check issues fixes..
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 0f646278..e4d98298 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -214,17 +214,18 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
if(result.linkUrl().isEmpty())
{
// page action
- if (selectedText().startsWith("http://") || selectedText().startsWith("https://"))
+ QString text = selectedText();
+ if (text.startsWith( QLatin1String("http://") ) || text.startsWith( QLatin1String("https://") ))
{
//open selected text url in a new tab
- a = new KAction(KIcon("tab-new"), i18n("Open: '") + selectedText().toUtf8().left(15) + QString("...'"), this);
- a->setData(QUrl(selectedText()));
+ a = new KAction(KIcon("tab-new"), i18n("Open: '") + text.toUtf8().left(15) + QString("...'"), this);
+ a->setData(QUrl(text));
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewTab()));
menu.addAction(a);
//open selected text url in a new window
- a = new KAction(KIcon("window-new"), i18n("Open: '") + selectedText().toUtf8().left(15) + QString("...'"), this);
- a->setData(QUrl(selectedText()));
+ a = new KAction(KIcon("window-new"), i18n("Open: '") + text.toUtf8().left(15) + QString("...'"), this);
+ a->setData(QUrl(text));
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewWindow()));
menu.addAction(a);
}