Sublime: on View destruction delete widget instantly, instead deleteLater
ClosedPublic

Authored by kossebau on Sep 1 2018, 9:30 AM.

Details

Summary

Having a defined destruction order allows to make more assumptions
in other code referring to the widgets and avoids extra work to track
the addditional lifetime of the widget objects (like e.g. needed with
the KTextEditor::View widget objects, which require the
KTextEditor::MainWindow to exists as long as there is a View object).

With the Sublime::View and the QWidget objects both bound to the same
thread which is the UI objects thread by current design, there is also
no need to defer the deletion into the QWidget object thread.

Test Plan

Have been running this for more than a month, no issues seen.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Sep 1 2018, 9:30 AM
Restricted Application added a project: KDevelop. · View Herald TranscriptSep 1 2018, 9:30 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
kossebau requested review of this revision.Sep 1 2018, 9:30 AM
kfunk accepted this revision.Sep 1 2018, 10:11 AM
kfunk added a subscriber: kfunk.

If that worked for you for one month, +1.

This revision is now accepted and ready to land.Sep 1 2018, 10:11 AM
This revision was automatically updated to reflect the committed changes.