diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-04-24 16:47:55 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-04-27 01:38:41 +0200 |
commit | 6a9e1ed2d94202eb1c7b334b1020abad64d8226f (patch) | |
tree | cfaa734fb6921fd312f0a58a0640f4b77e9f99a2 /src/urlbar | |
parent | set Main Window on KDirLister (diff) | |
download | rekonq-6a9e1ed2d94202eb1c7b334b1020abad64d8226f.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
CCBUG: 298114
CCBUG: 284829
Conflicts:
src/mainwindow.cpp
Backporting from master with the needed fixes
Diffstat (limited to 'src/urlbar')
-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; |