diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-04-24 16:47:55 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-04-24 16:47:55 +0200 |
commit | 4c0ad2049f3b49590a7d19f89ebcb767c3c15283 (patch) | |
tree | c043cc517efb6e8601266977e9f17a1277d3c32f /src/urlbar/urlresolver.cpp | |
parent | set Main Window on KDirLister (diff) | |
download | rekonq-4c0ad2049f3b49590a7d19f89ebcb767c3c15283.tar.xz |
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
Diffstat (limited to 'src/urlbar/urlresolver.cpp')
-rw-r--r-- | src/urlbar/urlresolver.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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 <KBookmark> -#include <KUriFilter> -#include <KCompletion> #include <KService> -#include <KConfig> -#include <KConfigGroup> #include <KProtocolInfo> // 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; |