Skip to content

Set the parent widget for subjobs

When calling addSubjob, we need to set the parent widget for the subjobs to the same widget of the baseJob.

To test:

  • Open Dolphin, copy a dir, A, to the same destination twice
  • You should get the file-already-exists dialog, which is supposed to be a modal dialog, but you find that you can still interact with the parent Dolphin window

This happens because:

  • Dolphin creates a PasteJob, then calls KJobWidgets::setWindow(job, this)
  • The PasteJob creates a CopyJob subjob, but for that subjob KJobWidgets::window() will return a nullptr

Incidentally, I think this is the main reason we got bugs like[1] in the first place... :)

[1] https://bugs.kde.org/show_bug.cgi?id=409607

Merge request reports

Loading