Sublime: on View destruction delete widget instantly, instead deleteLater

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

Description

Sublime: on View destruction delete widget instantly, instead deleteLater

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.

Reviewers: KDevelop, kfunk

Reviewed By: KDevelop, kfunk

Subscribers: kfunk, kdevelop-devel

Tags: KDevelop

Differential Revision: https://phabricator.kde.org/D15198