summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-09-13 15:03:56 +0200
committerMikolaj Boc <mikolaj.boc@qt.io>2022-09-14 09:19:01 +0200
commit3a7027a1aee307ba5329b7b8a2f006523e080b58 (patch)
tree143789452c8026661bd7df5279627e3fa14d4b4c /src/widgets/styles/qcommonstyle.cpp
parent20d7d41a7486fd5cbc659c5d19b65d0f2d21f596 (diff)
Add all known StyleHint values to QCommonStyle::styleHint's switch
This will ensure that we get compiler warnings when a newly added value is missing. Change-Id: I6de78534cb330aa4968ac018354a1ab37c499228 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp44
1 files changed, 42 insertions, 2 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index f1d8a11990..01fb688469 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -5371,8 +5371,48 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
case SH_SpinBox_SelectOnStep:
ret = true;
break;
- default:
- ret = 0;
+ case SH_EtchDisabledText:
+ case SH_DitherDisabledText:
+ case SH_ScrollBar_MiddleClickAbsolutePosition:
+ case SH_ScrollBar_ScrollWhenPointerLeavesControl:
+ case SH_Slider_SnapToValue:
+ case SH_Slider_SloppyKeyEvents:
+ case SH_ProgressDialog_CenterCancelButton:
+ case SH_PrintDialog_RightAlignButtons:
+ case SH_MainWindow_SpaceBelowMenuBar:
+ case SH_FontDialog_SelectAssociatedText:
+ case SH_Menu_AllowActiveAndDisabled:
+ case SH_Menu_SpaceActivatesItem:
+ case SH_ScrollView_FrameOnlyAroundContents:
+ case SH_MenuBar_AltKeyNavigation:
+ case SH_ComboBox_ListMouseTracking:
+ case SH_Menu_MouseTracking:
+ case SH_MenuBar_MouseTracking:
+ case SH_ItemView_ChangeHighlightOnFocus:
+ case SH_Widget_ShareActivation:
+ case SH_Workspace_FillSpaceOnMaximize:
+ case SH_ComboBox_Popup:
+ case SH_TitleBar_NoBorder:
+ case SH_Slider_StopMouseOverSlider:
+ case SH_RichText_FullWidthSelection:
+ case SH_Menu_Scrollable:
+ case SH_TabBar_PreferNoArrows:
+ case SH_ScrollBar_LeftClickAbsolutePosition:
+ case SH_SpinBox_AnimateButton:
+ case SH_DrawMenuBarSeparator:
+ case SH_WindowFrame_Mask:
+ case SH_ToolTip_Mask:
+ case SH_Menu_Mask:
+ case SH_Menu_FlashTriggeredItem:
+ case SH_Menu_FadeOutOnHide:
+ case SH_ItemView_PaintAlternatingRowColorsForEmptyArea:
+ case SH_ComboBox_UseNativePopup:
+ case SH_Table_AlwaysDrawLeftTopGridLines:
+ ret = false;
+ break;
+ case SH_CustomBase:
+ // Added to get compiler errors when a style hint is missing
+ ret = false;
break;
}