diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-05-07 00:06:40 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-05-08 19:02:09 +0200 |
commit | 1baf60d18cfb77730b60fd725e9c65d306149971 (patch) | |
tree | a66386df9670919506cf61c0d4a3b5b280b3315a /src/gui/text/qfontdatabase.cpp | |
parent | 920487bf6b4d06ce9fef82e99e262ee0dd7d2ea3 (diff) |
QFontDatabase: store Vietnamese writingSystemSample() in UTF-16
The old code stored it in UTF-8 with an encoded BOM.
Using the new QString::op+=(QStringView), we can store
the string, without the BOM, in ten instead of 15 bytes.
Change-Id: Ia1c51da523fcd6298b39bf2ec162a49c7cfdda63
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 75a0171aab..c511ec897b 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2213,16 +2213,8 @@ QString QFontDatabase::writingSystemSample(WritingSystem writingSystem) sample += QChar(0xac2f); break; case Vietnamese: - { - static const char vietnameseUtf8[] = { - char(0xef), char(0xbb), char(0xbf), char(0xe1), char(0xbb), char(0x97), - char(0xe1), char(0xbb), char(0x99), - char(0xe1), char(0xbb), char(0x91), - char(0xe1), char(0xbb), char(0x93), - }; - sample += QString::fromUtf8(vietnameseUtf8, sizeof(vietnameseUtf8)); + sample += u"\x1ED7\x1ED9\x1ED1\x1ED3"; break; - } case Ogham: sample += QChar(0x1681); sample += QChar(0x1682); |