aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2020-09-23 15:08:57 +0200
committerChristian Stenger <christian.stenger@qt.io>2020-09-24 06:00:05 +0000
commit0158dfcfd2e26a1786d23e9374a8c84e5adc935b (patch)
treeeb01629cd7a27b86d0b8cbbcc8c82c8a3ad1cdde
parentfb9a600704fca570a3613240b9003caad4b1e246 (diff)
LSP: Do not use FullyEncoded in QUrl::toString
Change-Id: I8f978327a1d12f7d418a77ac4bc70b135142f989 Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/libs/languageserverprotocol/lsptypes.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libs/languageserverprotocol/lsptypes.cpp b/src/libs/languageserverprotocol/lsptypes.cpp
index 04594e5493..c9e44e4c38 100644
--- a/src/libs/languageserverprotocol/lsptypes.cpp
+++ b/src/libs/languageserverprotocol/lsptypes.cpp
@@ -403,13 +403,11 @@ Utils::Link Location::toLink() const
if (!isValid(nullptr))
return Utils::Link();
- // QUrl::FullyDecoded is not supported by QUrl::toString.
// Ensure %xx like %20 are really decoded using fromPercentEncoding
// Else, a path with spaces would keep its %20 which would cause failure
// to open the file by the text editor. This is the cases with compilers in
// C:\Programs Files on Windows.
- auto file = uri().toString(QUrl::FullyDecoded | QUrl::PreferLocalFile);
-
+ auto file = uri().toString(QUrl::PrettyDecoded | QUrl::PreferLocalFile);
// fromPercentEncoding convert %xx encoding to raw values and then interpret
// the result as utf-8, so toUtf8() must be used here.
file = QUrl::fromPercentEncoding(file.toUtf8());