diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-28 14:50:21 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-28 14:50:21 +0200 |
commit | 7a7c3efc202db2bbcbb18b48ce9458628b4a68bb (patch) | |
tree | 51a8633ea4bdc0fd76237936707b71a4fae6ee4c /src/webview.cpp | |
parent | cleaning mainview code (unuseful method) (diff) | |
download | rekonq-7a7c3efc202db2bbcbb18b48ce9458628b4a68bb.tar.xz |
Krazy check issues fixes..
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 11 |
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); } |