From 7a7c3efc202db2bbcbb18b48ce9458628b4a68bb Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 28 Sep 2009 14:50:21 +0200 Subject: Krazy check issues fixes.. --- src/webview.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/webview.cpp') 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); } -- cgit v1.2.1