diff options
author | Øystein Heskestad <oystein.heskestad@qt.io> | 2022-01-05 17:55:31 +0100 |
---|---|---|
committer | Øystein Heskestad <oystein.heskestad@qt.io> | 2022-01-07 14:31:38 +0100 |
commit | 0edbf7f97d816e057d02393eb5990aa6c8caf87a (patch) | |
tree | bd497eb1965585103ff9ca45bb74d7bcd8fef0a9 /src/gui/text/qfontsubset.cpp | |
parent | 18671b0491e4806fdff95aac6c16a067890ef030 (diff) | |
download | qtbase-0edbf7f97d816e057d02393eb5990aa6c8caf87a.tar.gz |
Use ranged for loops instead of QString::utf16
Task-number: QTBUG-98763
Change-Id: I27a854121a783e67afcc4f8634ea7c8c921430c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/text/qfontsubset.cpp')
-rw-r--r-- | src/gui/text/qfontsubset.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index 295af01f8c..030c606047 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -692,12 +692,8 @@ static QTtfTable generateName(const QList<QTtfNameRecord> &name) off += len; } for (int i = 0; i < name.size(); ++i) { - const QString &n = name.at(i).value; - const ushort *uc = n.utf16(); - for (int i = 0; i < n.length(); ++i) { - s << quint16(*uc); - ++uc; - } + for (QChar ch : name.at(i).value) + s << quint16(ch.unicode()); } return t; } |