Fusion style: Remove unnecessary widget cast

Change-Id: I8d7fd79b396525ee00fb0ba95faf0c95b5d2899a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-03-01 19:35:07 +01:00 committed by The Qt Project
parent d93b2ef968
commit 4b7276b93f

View File

@ -1768,12 +1768,10 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
painter->save();
{
painter->fillRect(rect, option->palette.window());
if (widget && qobject_cast<const QMainWindow *>(widget->parentWidget())) {
QColor shadow = mergedColors(option->palette.background().color().darker(120),
outline.lighter(140), 60);
painter->setPen(QPen(shadow));
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
}
QColor shadow = mergedColors(option->palette.background().color().darker(120),
outline.lighter(140), 60);
painter->setPen(QPen(shadow));
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
}
painter->restore();
break;