Skip to content

WidgetsAskUserActionHandler: Use QPointer to check the validity of parent widgets

Méven Car requested to merge work/meven/cherry-pick-448532 into kf5

If Dolphin is closed during the copying process, and the overwrite/skip dialog appears, this crashes the copying process since the parent shows to faulty location.

Use QPointer to check that the parent widgets are still valid. If not, we just use nullptr, and the dialogs will still open.

This also cleans some repetition in code.

BUG:448532 (cherry picked from commit bdef648e)

Merge request reports