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>
This commit is contained in:
Olivier Goffart 2015-04-21 14:46:33 +02:00 committed by Olivier Goffart (Woboq GmbH)
parent d3d10cf23d
commit 0ad05259a5

View File

@ -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;