widgets: Add a QT_CONFIG(style_stylesheet) guard
for isWindowsStyle in QDockWidget Change-Id: Id471b91a415f1a677ced6022bdd05b7e1b72aad2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
0ffb7c419a
commit
91a52fc6a0
@ -160,9 +160,13 @@ bool QDockWidgetTitleButton::event(QEvent *event)
|
||||
static inline bool isWindowsStyle(const QStyle *style)
|
||||
{
|
||||
// Note: QStyleSheetStyle inherits QWindowsStyle
|
||||
const QStyle *effectiveStyle = style->inherits("QStyleSheetStyle")
|
||||
? static_cast<const QStyleSheetStyle *>(style)->baseStyle()
|
||||
: style;
|
||||
const QStyle *effectiveStyle = style;
|
||||
|
||||
#if QT_CONFIG(style_stylesheet)
|
||||
if (style->inherits("QStyleSheetStyle"))
|
||||
effectiveStyle = static_cast<const QStyleSheetStyle *>(style)->baseStyle();
|
||||
#endif
|
||||
|
||||
return effectiveStyle->inherits("QWindowsStyle");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user