From 0ad05259a5df56f0d8ff2a62b7765fb6247ffd7c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 21 Apr 2015 14:46:33 +0200 Subject: [PATCH] QWindowsStyle: Do not rely on the widget to draw the dock title There is no need to query widget->isWindow when this information is present in the QStyleOption state (it is even set using isWindow in QStyleOption::init) Change-Id: I4f3bbdd9c70d6253e9301bc168d61c7ecdbfdc06 Reviewed-by: J-P Nurmi --- src/widgets/styles/qwindowsstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index bed2b5c57a9..40597a41f39 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1795,7 +1795,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai QColor left, right; //Titlebar gradient - if (widget && widget->isWindow()) { + if (opt->state & QStyle::State_Window) { floating = true; if (active) { left = d->activeCaptionColor;