From 4b7276b93f21e4b131c8840ca2f6c6bf4f003595 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 1 Mar 2013 19:35:07 +0100 Subject: [PATCH] Fusion style: Remove unnecessary widget cast Change-Id: I8d7fd79b396525ee00fb0ba95faf0c95b5d2899a Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qfusionstyle.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 11558de16a..defdf30b6b 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1768,12 +1768,10 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio painter->save(); { painter->fillRect(rect, option->palette.window()); - if (widget && qobject_cast(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;