Delete KCModule before deleting QApplication
ClosedPublic

Authored by davidedmundson on Jan 18 2017, 11:53 PM.

Details

Summary

Currently the dialog just leaks. As a top level window it should get
cleaned up by the QApplication destructor.

This hopefully 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
Hopefully Jan can confirm if this fixes the network KCM crash.

Diff Detail

Repository
R126 KDE CLI Utilities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Delete KCModule before deleting QApplication.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 18 2017, 11:53 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Seems to work.

It also fixes another (maybe related) issue in network mananager:

  1. Right Click the nm applet and choose "Configure Network Connections...."
  2. Click "Add new connection"
  3. Having the "Choose a connection type" window open, click "Cancel" on the main configuration window.

Without this patch, trying to open nm's configuration settings again, doesn't work and you get the following error

"kcmshell5 with modules ' "org.kde.kcmshell_kcm_networkmanagement.desktop" ' is already running."

The patch proposed here seems to fix it.

jgrulich accepted this revision.Jan 19 2017, 6:13 AM
jgrulich added a reviewer: jgrulich.
jgrulich added a subscriber: jgrulich.

I just tested it and it works perfectly and the kcm doesn't crash anymore. Thank you David!!.

Close this bug please with this review https://bugs.kde.org/show_bug.cgi?id=374990.

This revision is now accepted and ready to land.Jan 19 2017, 6:13 AM
This revision was automatically updated to reflect the committed changes.