Skip to content

QXdgDesktopPortalFileDialog: use QUrl to store directory & selection

Friedrich W. H. Kossebau requested to merge work/kossebau/fixxdgportalurls into master

Fixes QXdgDesktopPortalFileDialog::directory() returning a broken QUrl. while making other code consistent & more fail-proof.

Old code had some mixups where the used plain strings had file:/// scheme prefixes if read out from the "uris" of the D-Bus replies, but not when generated from QUrls passed in by the own API. Also is the usage of QUrl::fromLocalFile/toLocalFile preferred over getting a QUrl's path() property.

Tested with running apps using the filedialog and setting PLASMA_INTEGRATION_USE_PORTAL=1 to trigger the portal dialog.

@grulich @apol @jbbgameich

Merge request reports