diff options
author | Jonas Karlsson <jonas.karlsson@qt.io> | 2020-05-27 12:35:28 +0200 |
---|---|---|
committer | Jonas Karlsson <jonas.karlsson@qt.io> | 2020-06-05 12:15:42 +0200 |
commit | 3d1b34e5bfd56d8035fa53ffb14726e6120f3ff0 (patch) | |
tree | 1893ba4f66392c74a4e3ff713070381eb3b7b91c /src/quick/items/context2d | |
parent | 8bcb127848a2fb533fc923e7e266dd4d56251201 (diff) |
Update qtbase dependency
- Adapt to uniform name type change.
- Fix compiler warnings from deprecated QChar constructor.
Use string literal prefix 'u' to avoid run-time conversion.
Follow up on 1b33ee95e5c6e5e27f732fd273920861fdae486a in qtbase.
Change-Id: I2322a630ba2dd394576cd65bd7d6eac937a545f2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/items/context2d')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 12a4ce32df..e2d36b6ec0 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -261,7 +261,7 @@ static QStringList qExtractFontFamiliesFromString(const QStringRef &fontFamilies QString currentFamily; for (int index = 0; index < fontFamiliesString.size(); ++index) { const QChar ch = fontFamiliesString.at(index); - if (ch == '"' || ch == '\'') { + if (ch == u'"' || ch == u'\'') { if (quoteIndex == -1) { quoteIndex = index; } else { @@ -276,7 +276,7 @@ static QStringList qExtractFontFamiliesFromString(const QStringRef &fontFamilies return QStringList(); } } - } else if (ch == ' ' && quoteIndex == -1) { + } else if (ch == u' ' && quoteIndex == -1) { // This is a space that's not within quotes... if (!currentFamily.isEmpty()) { // and there is a current family; consider it the end of the current family. @@ -384,7 +384,7 @@ static QFont qt_font_from_string(const QString& fontString, const QFont ¤t return currentFont; } - int fontSizeStart = fontString.lastIndexOf(' ', fontSizeEnd); + int fontSizeStart = fontString.lastIndexOf(u' ', fontSizeEnd); if (fontSizeStart == -1) { // The font size might be the first token in the font string, which is OK. // Regardless, we'll find out if the font is invalid with qSetFontSizeFromToken(). |