From 9a59711b78621b66bd7ac8e13e6237db321bd60b Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 22 Feb 2012 19:12:22 +0100 Subject: [PATCH] [Fix] Fixed showing url's in locationbar. Regression from da3d929 --- plugins/TestPlugin/TestPlugin.pro | 1 + src/tools/globalfunctions.cpp | 12 ++++++++++-- translations/homepage/id_ID.php | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/TestPlugin/TestPlugin.pro b/plugins/TestPlugin/TestPlugin.pro index abebc1549..63cae9c98 100644 --- a/plugins/TestPlugin/TestPlugin.pro +++ b/plugins/TestPlugin/TestPlugin.pro @@ -17,5 +17,6 @@ TRANSLATIONS += cs_CZ.ts\ sr_RS.ts\ de_DE.ts\ el_GR.ts\ + id_ID.ts\ include(../../plugins.pri) diff --git a/src/tools/globalfunctions.cpp b/src/tools/globalfunctions.cpp index 41c686f91..b7f784d47 100644 --- a/src/tools/globalfunctions.cpp +++ b/src/tools/globalfunctions.cpp @@ -151,8 +151,16 @@ QUrl qz_makeRelativeUrl(const QUrl &baseUrl, const QUrl &rUrl) QString qz_urlEncodeQueryString(const QUrl &url) { QString returnString = url.toString(QUrl::RemoveQuery | QUrl::RemoveFragment); - returnString.append(url.encodedQuery()); - returnString.append(url.encodedFragment()); + + if (url.hasQuery()) { + returnString.append("?"); + returnString.append(url.encodedQuery()); + } + + if (url.hasFragment()) { + returnString.append("#"); + returnString.append(url.encodedFragment()); + } return returnString; } diff --git a/translations/homepage/id_ID.php b/translations/homepage/id_ID.php index fa07f4549..3e6808446 100644 --- a/translations/homepage/id_ID.php +++ b/translations/homepage/id_ID.php @@ -1,4 +1,4 @@ -