Skip to content

Streamline setting job UiDelegate's

Ahmad Samir requested to merge work/ahmad/delegates into master
  • Change delegateExtension() so that when a job doesn't have a UiDelegate(), we should try finding the UiDelegate of parentJob()

  • Don't use job->setUiDeletegate(parentjob), that doesn't work, as a UiDelegate only tracks one job; and it's not needed as KIO::delegateExtension() already tries to find the UiDelegate of the parent job

  • If we want to override a parent job errorText, we can't use parent->addSubjob(subjob), because that automatically connects subjob result() signal to parent::slotResult() (instead use a lambda, see the code in DropJob), and simpy pass parent (DropJob in this case) to the constructor of the job (ApplicationLauncherJob in this case), this way delegateExtension() will be able to find the UiDelegate of the parent DropJob

  • Fix dropjob unit test, set the default UiDelegateFactory/Extension to nullptr in initTestCase().

NO_CHANGELOG

Edited by Ahmad Samir

Merge request reports