aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-10-11 15:37:33 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-10-13 05:27:47 +0000
commitc46b330fa721e82849194472651430ce255d06e1 (patch)
treeb71d291ff0fe010d7d4cf3ed13e2367e91da497e
parentfeb076d23ed832b21bf415032146570f4afb25d5 (diff)
Revert "Fix for possible crash in QSGDefaultLayer::grab"6.1
This reverts commit 1c5de027d0c31d1d6697bd0557128d92207763d8. The fix here is not correct. Calling a QSGRhiLayer function from the gui thread is very wrong and can cause a set of unexpected issues. The Address Sanitizer catches this by recognizing that the render thread is trying to do something with an object destroyed in the meantime on the main thread in the layer->setItem(null) call. The issue the original fix is trying to address needs to be addressed in some different form. Fixes: QTBUG-94975 Change-Id: I46f904026281201fc6d233ed7d3bdc7080934afe Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit a5f0361622eb08eab6c3474d5fc249d1962e3d1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/items/qquickshadereffectsource.cpp8
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h1
2 files changed, 0 insertions, 9 deletions
diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp
index 4f61d61309..b298ed74da 100644
--- a/src/quick/items/qquickshadereffectsource.cpp
+++ b/src/quick/items/qquickshadereffectsource.cpp
@@ -344,7 +344,6 @@ void QQuickShaderEffectSource::setSourceItem(QQuickItem *item)
d->refFromEffectItem(m_hideSource);
d->addItemChangeListener(this, QQuickItemPrivate::Geometry);
connect(m_sourceItem, SIGNAL(destroyed(QObject*)), this, SLOT(sourceItemDestroyed(QObject*)));
- connect(m_sourceItem, SIGNAL(parentChanged(QQuickItem*)), this, SLOT(sourceItemParentChanged(QQuickItem*)));
} else {
qWarning("ShaderEffectSource: sourceItem and ShaderEffectSource must both be children of the same window.");
m_sourceItem = nullptr;
@@ -364,13 +363,6 @@ void QQuickShaderEffectSource::sourceItemDestroyed(QObject *item)
}
-void QQuickShaderEffectSource::sourceItemParentChanged(QQuickItem *parent)
-{
- if (!parent && m_texture)
- m_texture->setItem(0);
-}
-
-
/*!
\qmlproperty rect QtQuick::ShaderEffectSource::sourceRect
diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h
index 921038e49a..fe419e5959 100644
--- a/src/quick/items/qquickshadereffectsource_p.h
+++ b/src/quick/items/qquickshadereffectsource_p.h
@@ -174,7 +174,6 @@ Q_SIGNALS:
private Q_SLOTS:
void sourceItemDestroyed(QObject *item);
void invalidateSceneGraph();
- void sourceItemParentChanged(QQuickItem *parent);
protected:
void releaseResources() override;