diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-08-28 16:55:25 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-09-24 13:48:39 +0200 |
commit | 74acbcc9f31aa2c64d076e1157979537d90d3f6d (patch) | |
tree | c896835ef345e8663aee2b6bf4b13e5779a6fd58 /tests/auto/focus | |
parent | 6059a7765b123a6f3fb221db9674a995bae1881c (diff) |
Fix fallback styles overwriting themes
In Qt 5, QtQuickControls2Plugin::registerTypes() was responsible for
calling initializeTheme() on each style plugin. Now that we delegate
more work to the QML engine, each style plugin calls initializeTheme()
via registerTypes().
To avoid fallback styles overwriting font and palette data set by the
current style, we need to check if the theme has been intialized before
calling initializeTheme(). To do this, we add a static
"themeInitialized" bool that QQuickStylePlugin sets to true after
calling intializeTheme() for the first time. It checks this value and
avoids calling intializeTheme() if it's true.
We also need to make QQuickStylePlugin ensure that the theme it's
initializing belongs to the current style.
Fixes: QTBUG-86303
Change-Id: Ie65e646677c78622829f4949c41cb79204cf5786
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto/focus')
0 files changed, 0 insertions, 0 deletions