https://bugs.kde.org/show_bug.cgi?id=436049

David Faure <fa...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/kio/commit/9fef54905
                   |                            |d25fcebe7f3f554537df4ceef49
                   |                            |a541

--- Comment #3 from David Faure <fa...@kde.org> ---
Git commit 9fef54905d25fcebe7f3f554537df4ceef49a541 by David Faure, on behalf
of Ahmad Samir.
Committed on 13/05/2021 at 23:06.
Pushed by dfaure into branch 'master'.

When finding a job delegate extension, also try the uiDelegate() of its parents

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, if that parent is a KCompositeJob (the only class
that can have sub-jobs).
And if that doesn't work, check the parent of the parent... etc (dfaure's
suggestion); until we find one or return nulltpr.

M  +14   -1    src/core/jobuidelegatefactory.h

https://invent.kde.org/frameworks/kio/commit/9fef54905d25fcebe7f3f554537df4ceef49a541

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to