summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-07-05 14:00:45 +0200
committerEike Ziller <eike.ziller@nokia.com>2012-07-12 17:25:44 +0200
commitf2399eb7754e542f78d28c877863679b92206c3d (patch)
tree0f9a58ac882312c7524c1a11e8512c6ce96f8c57
parent96b7d4a182933617277f87dba031f5113551a9f8 (diff)
downloadqt-creator-f2399eb7754e542f78d28c877863679b92206c3d.tar.gz
Disable QGraphicsDropShadowEffect for Mac
The QGraphicsDropShadowEffect::draw() results in a crash on Mac https://bugreports.qt-project.org/browse/QTBUG-23205 . Task-number: QTCREATORBUG-7605 Change-Id: Icee71e6452997b2daede7ef4735e508caf68aa1a Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com> (cherry picked from commit d0152332a47837e1ec8522175a0a6d3571c4fba5) Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidget.cpp8
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.cpp4
-rw-r--r--src/libs/qmleditorwidgets/customcolordialog.cpp4
3 files changed, 16 insertions, 0 deletions
diff --git a/src/libs/qmleditorwidgets/contextpanewidget.cpp b/src/libs/qmleditorwidgets/contextpanewidget.cpp
index d6c6621c80..c33f4142fd 100644
--- a/src/libs/qmleditorwidgets/contextpanewidget.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidget.cpp
@@ -102,10 +102,14 @@ DragWidget::DragWidget(QWidget *parent) : QFrame(parent)
m_startPos = QPoint(-1, -1);
m_pos = QPoint(-1, -1);
+ // TODO: The following code should be enabled for OSX
+ // when QTBUG-23205 is fixed
+#ifndef Q_OS_MAC
m_dropShadowEffect = new QGraphicsDropShadowEffect;
m_dropShadowEffect->setBlurRadius(6);
m_dropShadowEffect->setOffset(2, 2);
setGraphicsEffect(m_dropShadowEffect);
+#endif
}
void DragWidget::mousePressEvent(QMouseEvent * event)
@@ -123,10 +127,14 @@ void DragWidget::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
m_startPos = QPoint(-1, -1);
+ // TODO: The following code should be enabled for OSX
+ // when QTBUG-23205 is fixed
+#ifndef Q_OS_MAC
m_dropShadowEffect = new QGraphicsDropShadowEffect;
m_dropShadowEffect->setBlurRadius(6);
m_dropShadowEffect->setOffset(2, 2);
setGraphicsEffect(m_dropShadowEffect);
+#endif
}
QFrame::mouseReleaseEvent(event);
}
diff --git a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
index fd5f3256e9..6b984a183b 100644
--- a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
@@ -611,10 +611,14 @@ PreviewLabel::PreviewLabel(QWidget *parent)
m_hooverInfo->setFrameShape(QFrame::StyledPanel);
m_hooverInfo->setFrameShadow(QFrame::Sunken);
+ // TODO: The following code should be enabled for OSX
+ // when QTBUG-23205 is fixed
+#ifndef Q_OS_MAC
QGraphicsDropShadowEffect *dropShadowEffect = new QGraphicsDropShadowEffect;
dropShadowEffect->setBlurRadius(4);
dropShadowEffect->setOffset(2, 2);
m_hooverInfo->setGraphicsEffect(dropShadowEffect);
+#endif
m_hooverInfo->setAutoFillBackground(true);
m_hooverInfo->raise();
}
diff --git a/src/libs/qmleditorwidgets/customcolordialog.cpp b/src/libs/qmleditorwidgets/customcolordialog.cpp
index 59bd6744eb..f683976599 100644
--- a/src/libs/qmleditorwidgets/customcolordialog.cpp
+++ b/src/libs/qmleditorwidgets/customcolordialog.cpp
@@ -52,10 +52,14 @@ CustomColorDialog::CustomColorDialog(QWidget *parent) : QFrame(parent )
setFrameShape(QFrame::StyledPanel);
setFrameShadow(QFrame::Sunken);
+ // TODO: The following code should be enabled for OSX
+ // when QTBUG-23205 is fixed
+#ifndef Q_OS_MAC
QGraphicsDropShadowEffect *dropShadowEffect = new QGraphicsDropShadowEffect;
dropShadowEffect->setBlurRadius(6);
dropShadowEffect->setOffset(2, 2);
setGraphicsEffect(dropShadowEffect);
+#endif
setAutoFillBackground(true);
m_hueControl = new HueControl(this);