Don't set ArkViewer as child of Part::widget()
ClosedPublic

Authored by elvisangelaccio on Apr 14 2016, 1:32 PM.

Details

Summary

ArkViewer currently has the Part::widget() as parent. This prevents the main window to gain focus if one or more ArkViewer dialogs are open.

Removing the parent fixes the issue, but we need to set the Qt::WA_DeleteOnClose attribute, otherwise the widget will not be deleted causing leaks.

(fix meant for Applications/16.04)

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Don't set ArkViewer as child of Part::widget().
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
elvisangelaccio added a project: Ark.
elvisangelaccio added a subscriber: kde-utils-devel.

Since the preview windows don't have a parent anymore, we need to manually close them when the main window is closed.

rthomsen edited edge metadata.Apr 16 2016, 7:33 PM

Another potential issue: If one or more preview windows are open, and the user opens another archive, the preview window(s) from the previous archive remain open. I'm not sure if this is desirable?

rthomsen accepted this revision.Apr 16 2016, 7:58 PM
rthomsen edited edge metadata.

My previous comment was unrelated to this diff.

This revision is now accepted and ready to land.Apr 16 2016, 7:58 PM
This revision was automatically updated to reflect the committed changes.