summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-11-28 09:14:07 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-09 08:23:21 (GMT)
commite8460dbefd30b657f27c0c111e8e2ec5d74d6bb2 (patch)
tree36060506170ac1f38f20d44881a77b52ecad2ec8 /src/gui
parent7cc67c0392b630942e06d9213a517de70670d870 (diff)
downloadQt-e8460dbefd30b657f27c0c111e8e2ec5d74d6bb2.zip
Qt-e8460dbefd30b657f27c0c111e8e2ec5d74d6bb2.tar.gz
Qt-e8460dbefd30b657f27c0c111e8e2ec5d74d6bb2.tar.bz2
Disable graphic effects for widgets on Mac to prevent crashing
Since graphics effects on widgets are not supported on Mac then the code is #ifdef'd out so that it does not crash instead. Task-number: QTBUG-24792 Change-Id: I4d81675b54816fa60cf66696b1a0a7b0206474e3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 3a0261e..2b8ead3 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5308,6 +5308,9 @@ QGraphicsEffect *QWidget::graphicsEffect() const
\note This function will apply the effect on itself and all its children.
+ \note Graphics effects are not supported on Mac, so they will not cause any difference
+ to the rendering of the widget.
+
\since 4.6
\sa graphicsEffect()
@@ -5493,7 +5496,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
Q_Q(QWidget);
-#ifndef QT_NO_GRAPHICSEFFECT
+#if !defined(QT_NO_GRAPHICSEFFECT) && !defined(Q_WS_MAC)
if (graphicsEffect && graphicsEffect->isEnabled()) {
QGraphicsEffectSource *source = graphicsEffect->d_func()->source;
QWidgetEffectSourcePrivate *sourced = static_cast<QWidgetEffectSourcePrivate *>