kwin/plugins/kdecorations/aurorae
David Edmundson 446e23af5a [aurorae] Fix crash on KCM teardown with Qt5.14
Summary:
Context behaviour subtly changed in Qt5.14 which has exposed some
questionable things in this KCM.

Auorae::Decoration is a context property of the loaded QML.

QObject::~QObject signals it's own deletion before deleting children.
This means the bindings of loaded QML update in particular

aurorae.qml
   DecorationOptions {
        id: options
        deco: decoration
    }

DecorationOptions has a pointer to the previously set decoration which
is now dangling, and we crash.

Rather than adding more guards and smart pointers in DecorationOptions,
this patch deletes the QQmlContext before deleting the context
properties that we expose.

It also moves unreferring the shared qmlcontext we inherit from till
after we've deleted the child context, because it didn't make sense.

Test Plan:
Opened KCM
Closed the KCM
didn't crash

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24594
2019-10-15 12:40:55 +01:00
..
src [aurorae] Fix crash on KCM teardown with Qt5.14 2019-10-15 12:40:55 +01:00
themes Cleanup style in CMakeLists.txt files 2019-09-17 16:03:05 +03:00
AUTHORS Move clients/ to plugins/kdecorations/ 2016-04-15 15:21:03 +02:00
CMakeLists.txt Move clients/ to plugins/kdecorations/ 2016-04-15 15:21:03 +02:00
README Move clients/ to plugins/kdecorations/ 2016-04-15 15:21:03 +02:00
theme-description Update URLs to use https 2019-03-25 19:26:23 +01:00
TODO Move clients/ to plugins/kdecorations/ 2016-04-15 15:21:03 +02:00

Aurorae is a themeable window decoration for KWin.

It supports theme files consisting of several SVG files for decoration and buttons. Themes can be
installed and selected directly in the configuration module of KWin decorations.

Please have a look at theme-description on how to write a theme file.