summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurlidna.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qurlidna.cpp')
-rw-r--r--src/corelib/io/qurlidna.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp
index 4aa16aaa71..f5ba691d72 100644
--- a/src/corelib/io/qurlidna.cpp
+++ b/src/corelib/io/qurlidna.cpp
@@ -2525,16 +2525,14 @@ QString qt_ACE_do(QStringView domain, AceOperation op, AceLeadingDot dot)
result.resize(prevLen + labelLength);
{
QChar *out = result.data() + prevLen;
- const QChar *in = domain.data() + lastIdx;
- const QChar *e = in + labelLength;
- for (; in < e; ++in, ++out) {
- ushort uc = in->unicode();
+ for (QChar c : domain.mid(lastIdx, labelLength)) {
+ const auto uc = c.unicode();
if (uc > 0x7f)
simple = false;
if (uc >= 'A' && uc <= 'Z')
- *out = QChar(uc | 0x20);
+ *out++ = QChar(uc | 0x20);
else
- *out = *in;
+ *out++ = c;
}
}