WIP: Show file dialog in directory mode when only directory is requested
Needs ReviewPublic

Authored by volkov on Jul 15 2019, 8:23 PM.



Diff Detail

R838 Flatpak Support: KDE Portal for XDG Desktop
No Linters Available
No Unit Test Coverage
Build Status
Buildable 13989
Build 14007: arc lint + arc unit
volkov created this revision.Jul 15 2019, 8:23 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 15 2019, 8:23 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
volkov requested review of this revision.Jul 15 2019, 8:23 PM

The FileChooser portal will never ask for directories, it's currently not possible to expose a directory to the sandbox environment. If you look at [1], you can see it always uses native file dialog in case of directories, which means native file dialog will be opened inside the sandbox, not through the portal.

[1] - https://code.woboq.org/qt5/qtbase/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp.html#_ZN27QXdgDesktopPortalFileDialog4execEv

This is for non-sandboxed applications that want to use KDE file dialog.

If this is meant to be used by Firefox, then it won't work either, even when you use GTK_USE_PORTAL=1.

What would be the usecase here? I can think of Firefox only, but as I mentioned, it won't work with Firefox, because it behaves exactly the same way as Qt, which means a dialog inside sandbox is opened when requesting to open a folder.