aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrols2plugin.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-12-11 11:21:52 +0100
committerMitch Curtis <mitch.curtis@qt.io>2019-01-08 15:10:31 +0000
commit0ca69961a2bd544cd417d849018427ae0c8cda05 (patch)
treea956f2bae9646d224e94408bc36cfe1da1df4f87 /src/imports/controls/qtquickcontrols2plugin.cpp
parentd438e61fcd52c4a45fefc42edf6e8fe806b11de2 (diff)
Fix incorrect font size in certain styles on Windows
When a style is loaded, QtQuickControls2Plugin::loadStylePlugins() is called. This function uses QPluginLoader to search the style directory for the style plugin. On Windows, the code was looking for the plugin without the debug "d" suffix, causing the style plugin to fail to load for debug builds. This results in the QQuickTheme subclasses not being created, causing controls to be shown with default font sizes. This patch fixes the issue by appending the "d" suffix on Windows. Change-Id: I706dbe39325a104bcd6ce72cb0a8d37025adb055 Fixes: QTBUG-71902 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/imports/controls/qtquickcontrols2plugin.cpp')
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
index 5bbbe422..a03cbd06 100644
--- a/src/imports/controls/qtquickcontrols2plugin.cpp
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -278,6 +278,10 @@ QList<QQuickStylePlugin *> QtQuickControls2Plugin::loadStylePlugins()
// release versions of the same Qt libraries (due to the plugin's dependencies).
filePath += QStringLiteral("_debug");
#endif // Q_OS_MACOS && QT_DEBUG
+#if defined(Q_OS_WIN) && defined(QT_DEBUG)
+ // Debug versions of plugins have a "d" prefix on Windows.
+ filePath += QLatin1Char('d');
+#endif // Q_OS_WIN && QT_DEBUG
loader.setFileName(filePath);
QQuickStylePlugin *stylePlugin = qobject_cast<QQuickStylePlugin *>(loader.instance());
if (stylePlugin)