From 7fb79720218cf89e606ff2dac818cff187866bc8 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 29 Aug 2024 16:53:20 +0200 Subject: [PATCH] Widgets/fusion style: remove check for _q_isComboBoxPopupItem property The fusion style was the only style which checked for an undocumented property '_q_isComboBoxPopupItem' to determine if a CE_MenuItem should ignore the drawing of a checkmark. Remove it to be in sync with all other styles. Task-number: QTBUG-127536 Change-Id: I6f0af2219a2da1d8d1920cb95c233fb3e32a21ab Reviewed-by: Axel Spoerl Reviewed-by: Volker Hilsheimer (cherry picked from commit a3568a19eaba98697854db50af5546c09464ca73) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/styles/qfusionstyle.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index f41533ed29d..89e904b5a16 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1453,13 +1453,10 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio int checkcol = qMax(menuItem->rect.height() * 0.79, qMax(menuItem->maxIconWidth, dpiScaled(21, option))); bool ignoreCheckMark = false; - if ( #if QT_CONFIG(combobox) - qobject_cast(widget) || -#endif - (option->styleObject && option->styleObject->property("_q_isComboBoxPopupItem").toBool())) + if (qobject_cast(widget)) ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate - +#endif if (!ignoreCheckMark || menuItem->state & (State_On | State_Off)) { // Check, using qreal and QRectF to avoid error accumulation const qreal boxMargin = dpiScaled(3.5, option);