summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-02-27 21:26:18 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-03-01 11:59:36 +0000
commite7e3808092001588d0d2fe1fb52b4d6f89739c90 (patch)
tree651131678a47bdc9ef1efd3d6aeaf1800ca90c8c
parent59a445e23f862e21914e1a2bf486029ac8e6d35e (diff)
QQuickPaletteProviderPrivateBase: use palette getter
Otherwise, we can get a crash in QQuickPopupItemPrivate, which does not have a palette when using the Fusion style (so m_palette is nullptr), but instead hands us its popup's palette. Change-Id: Ib472139735dc3a7892771c6097267c0ec6902a99 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6b8a6b9fc86e94c1160d640a2b9718a7ae275b08) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/items/qquickpaletteproviderprivatebase_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickpaletteproviderprivatebase_p.h b/src/quick/items/qquickpaletteproviderprivatebase_p.h
index a600a23ce6..b1b5958329 100644
--- a/src/quick/items/qquickpaletteproviderprivatebase_p.h
+++ b/src/quick/items/qquickpaletteproviderprivatebase_p.h
@@ -323,7 +323,7 @@ void QQuickPaletteProviderPrivateBase<I, Impl>::inheritPalette(const QPalette &p
if (providesPalette()) {
// If palette is changed, then this function will be invoked
// for all children because of connection with signal changed()
- m_palette->inheritPalette(parentPalette);
+ palette()->inheritPalette(parentPalette);
} else {
// Otherwise, just propagate parent palette to all children
updateChildrenPalettes(parentPalette);