From 463ccfc8bbbe65e8e2859ec1b6dfd6e787733d99 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sun, 24 Jun 2018 13:28:23 +0100 Subject: [PATCH] Revert "Workaround crash in Aurorae destruction" This reverts commit 275b7ee0f456328de870dcdc297871d4eb8cfff2. BUG: 395732 --- plugins/kdecorations/aurorae/src/aurorae.cpp | 10 ++++++---- plugins/kdecorations/aurorae/src/aurorae.h | 6 +----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/kdecorations/aurorae/src/aurorae.cpp b/plugins/kdecorations/aurorae/src/aurorae.cpp index 15266b7987..4c5879be2e 100644 --- a/plugins/kdecorations/aurorae/src/aurorae.cpp +++ b/plugins/kdecorations/aurorae/src/aurorae.cpp @@ -270,6 +270,8 @@ Decoration::~Decoration() if (m_context) { m_context->makeCurrent(m_offscreenSurface.data()); + delete m_renderControl; + delete m_view.data(); m_fbo.reset(); delete m_item; @@ -322,8 +324,8 @@ void Decoration::init() m_item->setParentItem(visualParent.value()); visualParent.value()->setProperty("drawBackground", false); } else { - m_renderControl.reset(new QQuickRenderControl); - m_view = new QQuickWindow(m_renderControl.data()); + m_renderControl = new QQuickRenderControl(this); + m_view = new QQuickWindow(m_renderControl); bool usingGL = m_view->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; m_view->setColor(Qt::transparent); m_view->setFlags(Qt::FramelessWindowHint); @@ -390,8 +392,8 @@ void Decoration::init() } m_updateTimer->start(); }; - connect(m_renderControl.data(), &QQuickRenderControl::renderRequested, this, requestUpdate); - connect(m_renderControl.data(), &QQuickRenderControl::sceneChanged, this, requestUpdate); + connect(m_renderControl, &QQuickRenderControl::renderRequested, this, requestUpdate); + connect(m_renderControl, &QQuickRenderControl::sceneChanged, this, requestUpdate); m_item->setParentItem(m_view->contentItem()); diff --git a/plugins/kdecorations/aurorae/src/aurorae.h b/plugins/kdecorations/aurorae/src/aurorae.h index 80e477ba04..3b280990e6 100644 --- a/plugins/kdecorations/aurorae/src/aurorae.h +++ b/plugins/kdecorations/aurorae/src/aurorae.h @@ -87,11 +87,7 @@ private: KWin::Borders *m_extendedBorders; KWin::Borders *m_padding; QString m_themeName; - - //workaround QtBug-68997 - //deleting of a RenderControl/controlled window triggers deletion of other queued deleted items - //deleting this queued means we know we're not processing anything else at the same time and should minimise the damage - QScopedPointer m_renderControl; + QQuickRenderControl *m_renderControl = nullptr; QScopedPointer m_updateTimer; QScopedPointer m_context; QScopedPointer m_offscreenSurface;