summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-06-18 17:07:35 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-06-18 17:07:35 +0200
commit7c0f4b24fd902279d82cc90d7a4112701fbd12b4 (patch)
tree3c67d57ab0bd7521dcc0bb75c8737fcbc92459df /shared
parent658354db329c5a0bd163a6366ce4705bed2eadf3 (diff)
Notify the NativeViewContainer when the QQuickNativeView is being destroyed.
Diffstat (limited to 'shared')
-rw-r--r--shared/native_view_container_qt.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/shared/native_view_container_qt.h b/shared/native_view_container_qt.h
index ce977ac19..185a5b826 100644
--- a/shared/native_view_container_qt.h
+++ b/shared/native_view_container_qt.h
@@ -65,6 +65,7 @@ public:
{
if (m_isQQuick) {
insert(new QQuickNativeView(renderWidgetHostView));
+ connect(m_currentQQuickNativeView, SIGNAL(destroyed(QObject*)), this, SLOT(destroyedNativeView(QObject*)));
return m_currentQQuickNativeView;
}
@@ -82,7 +83,6 @@ protected:
void insert(QQuickNativeView* nativeView)
{
- fprintf(stderr, "replace: %p with %p\n", m_currentQQuickNativeView, nativeView);
if (m_currentQQuickNativeView)
m_currentQQuickNativeView->setParentItem(0);
@@ -101,6 +101,11 @@ public Q_SLOTS:
m_currentQQuickNativeView->resize(w, h);
}
+ void destroyedNativeView(QObject* nativeView)
+ {
+ m_currentQQuickNativeView = 0;
+ }
+
private:
QObject* m_embeddable;
QWidgetNativeView* m_currentQWidgetNativeView;