From 4c0ad2049f3b49590a7d19f89ebcb767c3c15283 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 24 Apr 2012 16:47:55 +0200 Subject: Clean up url management - Let ftp url(s) work again - Do NOT check url twice via KUriFilter (removed MainWindow::filterUrl) - ensure we are lowering just http url hosts - mailto via urlbar handling BUG: 298114 CCBUG: 284829 --- src/urlbar/urlresolver.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/urlbar') diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 6d6a2378..833a48f9 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -35,11 +35,7 @@ // KDE Includes #include -#include -#include #include -#include -#include #include // Qt Includes @@ -256,9 +252,14 @@ void UrlResolver::computeQurlFromUserInput() QUrl urlFromUserInput = QUrl::fromUserInput(url); if (urlFromUserInput.isValid()) { + // ensure http(s) hosts are lower cases + if (urlFromUserInput.scheme().startsWith("http")) + { + QString hst = urlFromUserInput.host(); + urlFromUserInput.setHost(hst.toLower()); + } + QString urlString = urlFromUserInput.toString(); - if (!urlFromUserInput.isLocalFile()) - urlString = urlString.toLower(); QString gTitle = i18nc("Browse a website", "Browse"); UrlSearchItem gItem(UrlSearchItem::Browse, urlString, gTitle); _qurlFromUserInput << gItem; -- cgit v1.2.1