Delete KCModule before deleting QApplication
Summary:
Currently the dialog just leaks. As a top level window it should get
cleaned up by the QApplication destructor.
This fixes a bug where a QMenu in QML (a top level window with no
parent) gets deleted by both QApplication and the KCM closing the
QQuickView which then deletes every QML Element including the menu.
Test Plan:
KCM's still load, everything looks the same
Jan confirmed it fixed the network KCM crash.
BUG: 374990
Reviewers: Plasma
Subscribers: plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D4197