diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-25 00:19:55 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-25 18:42:08 +0000 |
commit | 47065844f666e1332a7fb5bcfdc6015e0f7e1591 (patch) | |
tree | b85c366307bc70fde090b1b0809d7cc360ece6a1 /src/imports/controls/material/qquickmaterialtheme.cpp | |
parent | 1acc393933650f824de427f6b0ca3e38a0a8bdb4 (diff) |
Replace QStringLiteral with QLatin1String in the proxy themes
This allows us, in theory, to test multiple styles in the same process
by calling qmlClearTypeRegistrations() between each style test round.
When QML types are cleared, QML plugins are unloaded, and the current
style plugin's proxy platform theme is destroyed. It leads to a nasty
crash if there are fonts stored in the Qt font database that have their
family names stored in the read-only data of an unloaded plugin.
Change-Id: I32a70077ac4502e16a753fb68f7efeef35d239b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialtheme.cpp')
-rw-r--r-- | src/imports/controls/material/qquickmaterialtheme.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/controls/material/qquickmaterialtheme.cpp b/src/imports/controls/material/qquickmaterialtheme.cpp index 0d2f8a70..1967a74b 100644 --- a/src/imports/controls/material/qquickmaterialtheme.cpp +++ b/src/imports/controls/material/qquickmaterialtheme.cpp @@ -45,15 +45,15 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme) { QFont font; - font.setFamily(QStringLiteral("Roboto")); + font.setFamily(QLatin1String("Roboto")); QString family = QFontInfo(font).family(); - if (family != QStringLiteral("Roboto")) { - font.setFamily(QStringLiteral("Noto")); + if (family != QLatin1String("Roboto")) { + font.setFamily(QLatin1String("Noto")); family = QFontInfo(font).family(); } - if (family == QStringLiteral("Roboto") || family == QStringLiteral("Noto")) { + if (family == QLatin1String("Roboto") || family == QLatin1String("Noto")) { systemFont.setFamily(family); buttonFont.setFamily(family); toolTipFont.setFamily(family); |