From 04ec0cfcef7c6ad878c0bc0a4951af32e230bacd Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 15 Feb 2012 14:06:28 +0100 Subject: [PATCH] Showing decoded url in locationbar now instead of percent encoded. - it will now show urls with non-ascii characters prettier - however it will NOT decode url domain from punycode back to unicode --- src/navigation/locationbar.cpp | 8 ++++---- src/popupwindow/popuplocationbar.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/navigation/locationbar.cpp b/src/navigation/locationbar.cpp index 8e4b04591..b299e1e46 100644 --- a/src/navigation/locationbar.cpp +++ b/src/navigation/locationbar.cpp @@ -199,14 +199,14 @@ void LocationBar::showUrl(const QUrl &url) return; } - QString encodedUrl = url.toEncoded(); + QString stringUrl = url.toString(); - if (url.toString() == "qupzilla:speeddial" || url.toString() == "about:blank") { - encodedUrl = ""; + if (stringUrl == "qupzilla:speeddial" || stringUrl == "about:blank") { + stringUrl = ""; } if (url.toEncoded() != text()) { - setText(encodedUrl); + setText(stringUrl); } p_QupZilla->statusBarMessage()->clearMessage(); diff --git a/src/popupwindow/popuplocationbar.cpp b/src/popupwindow/popuplocationbar.cpp index 02e9ccd42..3774001f6 100644 --- a/src/popupwindow/popuplocationbar.cpp +++ b/src/popupwindow/popuplocationbar.cpp @@ -62,7 +62,7 @@ void PopupLocationBar::setView(PopupWebView* view) void PopupLocationBar::showUrl(const QUrl &url) { - setText(url.toEncoded()); + setText(url.toString()); setCursorPosition(0); }