summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-04-24 16:47:55 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-04-27 01:38:41 +0200
commit6a9e1ed2d94202eb1c7b334b1020abad64d8226f (patch)
treecfaa734fb6921fd312f0a58a0640f4b77e9f99a2 /src/urlbar
parentset Main Window on KDirLister (diff)
downloadrekonq-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.cpp13
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;