summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-04-21 14:46:33 +0200
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-04-22 08:13:51 +0000
commit0ad05259a5df56f0d8ff2a62b7765fb6247ffd7c (patch)
treeb8efa7b8f99bad50e6eaf66b35006a43257b30c1 /src/widgets
parentd3d10cf23d61f4a011f1a7e9abdee1a92717e80f (diff)
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 <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index bed2b5c57a..40597a41f3 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;