Recent fixes to stylesheetstyle caused not calling fixupBorder()
when globalStyleSheetStyle is used.
Task-number: QTBUG-27651
Change-Id: I73263c951e2db7d574e81da3f60a1b79f3852716
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
}
}
- if (object) {
+ if (const QWidget *widget = qobject_cast<const QWidget *>(object)) {
QStyleSheetStyle *style = const_cast<QStyleSheetStyle *>(globalStyleSheetStyle);
- if (!style) {
- if (const QWidget *widget = qobject_cast<const QWidget *>(object)) {
- style = qobject_cast<QStyleSheetStyle *>(widget->style());
- if (style)
- fixupBorder(style->nativeFrameWidth(widget));
- }
- }
-
+ if (!style)
+ style = qobject_cast<QStyleSheetStyle *>(widget->style());
+ if (style)
+ fixupBorder(style->nativeFrameWidth(widget));
}
if (hasBorder() && border()->hasBorderImage())
defaultBackground = QBrush();