When finding a job delegate extension, also try the uiDelegate() of its parent
A use case for this is an OpenUrlJob, urlJob, that has a KIO::JobUiDelegate, it tries to open a .desktop file, and ends up creating an ApplicationLauncherJob subjob, appJob:
- calling appJob->setUiDelegate(urlJob->uiDelegate()) won't work because the uiDelegate() of urlJob is already tracking a job
- creating a new, basic, KJobUiDelegate for appJob won't work because we need a KIO::JobUiDelegate (e.g. to get a untrustedProgramInterface if the .desktop file isn't owned by root and isn't executable), however KIO::JobUiDelegate is in KIOWidgets and those jobs are in KIOGui
Instead, change KIO::delegateExtension() to check the uiDelegate() of the parent of its KJob arg.
Edited by Ahmad Samir