diff -r ef0373b55136 -r 758a864f9613 src/gui/styles/qmacstyle_mac.mm --- a/src/gui/styles/qmacstyle_mac.mm Fri Sep 17 08:34:18 2010 +0300 +++ b/src/gui/styles/qmacstyle_mac.mm Mon Oct 04 01:19:32 2010 +0300 @@ -1059,6 +1059,16 @@ } } +bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOptionButton *option) +{ + QMacStyle *macStyle = qobject_cast(pushButton->style()); + if (!macStyle) + return false; + HIThemeButtonDrawInfo bdi; + macStyle->d->initHIThemePushButton(option, pushButton, kThemeStateActive, &bdi); + return bdi.kind == kThemeBevelButton; +} + /** Creates a HIThemeButtonDrawInfo structure that specifies the correct button kind and other details to use for drawing the given combobox. Which button @@ -1430,6 +1440,9 @@ bool QMacStylePrivate::animatable(QMacStylePrivate::Animates as, const QWidget *w) const { + if (!w) + return false; + if (as == AquaPushButton) { QPushButton *pb = const_cast(static_cast(w)); if (w->window()->isActiveWindow() && pb && !mouseDown) {