summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurlidna.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-05-12 08:48:15 +0200
committerMarc Mutz <marc.mutz@kdab.com>2020-05-12 15:34:23 +0200
commitd8c843f05f55034edbda38bd84858f4713399fde (patch)
treefa21d8cdefd27d3fa88405b4f0f7b941425525df /src/corelib/io/qurlidna.cpp
parentfbd0e66705be8db52a67a809f28697dfa1f38e2f (diff)
QUrlIdna: QChar(0x2d) → QLatin1Char('-')
A reader of the code shoudn't need to know ASCII code points by heart, so don't force them to. Change-Id: I2c44fcf4a948b85dfbc02ac8b5b7b934e87b41a7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/io/qurlidna.cpp')
-rw-r--r--src/corelib/io/qurlidna.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp
index 9ef12899f0..49d84c2dbf 100644
--- a/src/corelib/io/qurlidna.cpp
+++ b/src/corelib/io/qurlidna.cpp
@@ -2240,7 +2240,7 @@ Q_AUTOTEST_EXPORT void qt_punycodeEncoder(const QChar *s, int ucLength, QString
// if basic code points were copied, add the delimiter character.
if (h > 0)
- *output += QChar(0x2d);
+ *output += QLatin1Char{'-'};
// while there are still unprocessed non-basic code points left in
// the input string...
@@ -2305,7 +2305,7 @@ Q_AUTOTEST_EXPORT QString qt_punycodeDecoder(const QString &pc)
// find the last delimiter character '-' in the input array. copy
// all data before this delimiter directly to the output array.
- int delimiterPos = pc.lastIndexOf(QChar(0x2d));
+ int delimiterPos = pc.lastIndexOf(QLatin1Char{'-'});
QString output = delimiterPos < 4 ?
QString() : pc.mid(start, delimiterPos - start);