diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2011-02-23 16:42:23 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2011-02-23 17:30:41 (GMT) |
commit | f41e395e9ebc6db33c21ff082b59f2d7b6d2a3b2 (patch) | |
tree | 3a68ff3a2e97ddd1dfbf7d11bbb5709d7c5c45bf /src/gui/kernel/qwidget.cpp | |
parent | b4079c3d3891331ee635f8578740b8fcf2f06ac5 (diff) | |
download | Qt-f41e395e9ebc6db33c21ff082b59f2d7b6d2a3b2.zip Qt-f41e395e9ebc6db33c21ff082b59f2d7b6d2a3b2.tar.gz Qt-f41e395e9ebc6db33c21ff082b59f2d7b6d2a3b2.tar.bz2 |
Move the Mac specific behavior in #ifdef.
Since the other platforms are not aware of the
unified toolbar, we move all the specific behaviors
in #ifdef sections.
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 407af02..5fc9951 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -2078,9 +2078,14 @@ void QWidgetPrivate::subtractOpaqueSiblings(QRegion &sourceRegion, bool *hasDirt { Q_Q(const QWidget); static int disableSubtractOpaqueSiblings = qgetenv("QT_NO_SUBTRACTOPAQUESIBLINGS").toInt(); - if (disableSubtractOpaqueSiblings || q->isWindow() || q->d_func()->isInUnifiedToolbar) + if (disableSubtractOpaqueSiblings || q->isWindow()) return; +#ifdef QT_MAC_USE_COCOA + if (q->d_func()->isInUnifiedToolbar) + return; +#endif // QT_MAC_USE_COCOA + QRect clipBoundingRect; bool dirtyClipBoundingRect = true; @@ -10373,10 +10378,12 @@ void QWidget::repaint(const QRect &rect) return; if (hasBackingStoreSupport()) { +#ifdef QT_MAC_USE_COCOA if (qt_widget_private(this)->isInUnifiedToolbar) { qt_widget_private(this)->unifiedSurface->renderToolbar(this, true); return; } +#endif // QT_MAC_USE_COCOA QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore) { tlwExtra->inRepaint = true; @@ -10406,10 +10413,12 @@ void QWidget::repaint(const QRegion &rgn) return; if (hasBackingStoreSupport()) { +#ifdef QT_MAC_USE_COCOA if (qt_widget_private(this)->isInUnifiedToolbar) { qt_widget_private(this)->unifiedSurface->renderToolbar(this, true); return; } +#endif // QT_MAC_USE_COCOA QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore) { tlwExtra->inRepaint = true; @@ -10467,10 +10476,12 @@ void QWidget::update(const QRect &rect) } if (hasBackingStoreSupport()) { +#ifdef QT_MAC_USE_COCOA if (qt_widget_private(this)->isInUnifiedToolbar) { qt_widget_private(this)->unifiedSurface->renderToolbar(this); return; } +#endif // QT_MAC_USE_COCOA QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore) tlwExtra->backingStore->markDirty(rect, this); @@ -10495,10 +10506,12 @@ void QWidget::update(const QRegion &rgn) } if (hasBackingStoreSupport()) { +#ifdef QT_MAC_USE_COCOA if (qt_widget_private(this)->isInUnifiedToolbar) { qt_widget_private(this)->unifiedSurface->renderToolbar(this); return; } +#endif // QT_MAC_USE_COCOA QTLWExtra *tlwExtra = window()->d_func()->maybeTopData(); if (tlwExtra && !tlwExtra->inTopLevelResize && tlwExtra->backingStore) tlwExtra->backingStore->markDirty(rgn, this); |