[knewfilemenu] Bind stat job connection lifetime to dialog, not the whole menu

Nicolas Fella requested to merge work/lifetime into master

The stat job is asynchronous so it may end after the dialog is closed and deleted.

In the slot we are accessing children of the dialog which then can lead to a crash

Change the third parameter in the connect to the dialog instead of the menu to automatically disconnect the connection when the dialog is destroyed

Thanks to Harald Sitter for the investigation.

BUG: 433347

Edited by Nicolas Fella

Merge request reports