Diffusion KIO c063b1ce8489

Add support for portals in KRun

Authored by GeeXT on Feb 21 2019, 8:14 PM.


Add support for portals in KRun

Currently KRun in Flatpak/Snap doesn't support portals so it can't launch an application
for a given url (because it can't break through sandbox). This patch allows KRun to use
portals to pass the url through sandbox. QDesktopServices::openUrl handles that case and sends
appropriate DBus calls to portals, so URIs will be proccessed accordingly by host system.

FEATURE: 399380

Test Plan:
I couldn't build KIO from master in current flatpak KDE runtime (even without the patch), so here are commands to test the patch on top
of KIO 5.54.1:

  1. Install org.kde.Sdk 5.12 from flathub
  2. Install org.kde.konversation from KDE Nightly flatpak repo (https://community.kde.org/Guidelines_and_HOWTOs/Flatpak)
  3. Apply the patch to KIO 5.54.1
  4. run 'flatpak run --filesystem=host --command=sh --devel org.kde.Sdk//5.12' to enter SDK
  5. build KIO
  6. exit SDK (exit or Ctrl+D)
  7. run flatpak shell with Konversation 'flatpak run --filesystem=host --command=sh org.kde.konversation'
  8. run LD_PRELOAD="path/to/libKF5KIOCore.so path/top/libKF5KIOWidgets.so path/to/libKF5KIOFileWidgets.so" /app/bin/konversation

to run it with just compiled KIO (the compiled libraries are located in bin directory inside your build directory)
Now link clicks should pass sandbox and do the appropriate actions (open browser for http links, email application for mailto links,
file manager for file://...)

Reviewers: jgrulich, apol, dfaure, Frameworks

Reviewed By: apol

Subscribers: ngraham, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D18762


ngrahamFeb 21 2019, 8:16 PM
Differential Revision
D18762: Add support for portals in KRun
R241:2bba2c0795d7: [KPropertiesDialog] Fix group combobox