D29153: Move handling of untrusted programs to ApplicationLauncherJob.

David Faure noreply at phabricator.kde.org
Fri Apr 24 15:33:31 BST 2020


dfaure created this revision.
dfaure added reviewers: ahmadsamir, broulik, ngraham.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
dfaure requested review of this revision.

REVISION SUMMARY
  This was still in KRun so the porting to ApplicationLauncherJob
  was actually losing that feature along the way.
  
  Move KRun's handling of untrusted programs to a separate class
  and provide it via an interface used by ApplicationLauncherJob
  and implemented in KIOWidgets.
  
  Ideally KIOWidget's JobUiDelegate class would implement it,
  but that's an exported class so it would be BIC.
  So for KF5, the JobUiDelegate registers the handler into kiogui
  using an internal global setter, and in KF6 JobUiDelegate itself
  can implement that interface. The benefit of this approach is
  that the application code stays the same:
  
    job->setUiDelegate(new KIO::JobUiDelegate);
  
  We'll have to update all the "new KDialogUiDelegate" to the above
  line instead, where using ApplicationLauncherJob.

TEST PLAN
  Unittest + starting a non-executable desktop file
  and a non-executable copy of dolphin, in dolphin.

REPOSITORY
  R241 KIO

BRANCH
  2020_04_UntrustedProgramHandler

REVISION DETAIL
  https://phabricator.kde.org/D29153

AFFECTED FILES
  autotests/applicationlauncherjobtest.cpp
  autotests/applicationlauncherjobtest.h
  src/core/CMakeLists.txt
  src/core/jobuidelegateextension.h
  src/core/untrustedprogramhandlerinterface.cpp
  src/core/untrustedprogramhandlerinterface.h
  src/gui/applicationlauncherjob.cpp
  src/gui/applicationlauncherjob.h
  src/widgets/CMakeLists.txt
  src/widgets/jobuidelegate.cpp
  src/widgets/krun.cpp
  src/widgets/widgetsuntrustedprogramhandler.cpp
  src/widgets/widgetsuntrustedprogramhandler.h

To: dfaure, ahmadsamir, broulik, ngraham
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200424/3d2857e6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list