Bug 430092 - Qt app compiled for KDE flatpak runtime cannot open directories
Summary: Qt app compiled for KDE flatpak runtime cannot open directories
Status: RESOLVED NOT A BUG
Alias: None
Product: Qt/KDE Flatpak Runtime
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-06 18:37 UTC by jstone
Modified: 2020-12-10 03:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jstone 2020-12-06 18:37:58 UTC
SUMMARY

A Flathub submission request for an Qt application was made recently, and a bug has been found where the application cannot open directories:

https://github.com/flathub/flathub/pull/1978


STEPS TO REPRODUCE
1. Run the following commands to install and run the flatpak:

    flatpak install --user https://dl.flathub.org/build-repo/32694/org.multimc.MultiMC.flatpakref
    flatpak run org.multimc.MultiMC

2. Try to click either:

Folders > View Instance Folder

.. or:

Folders > View Central Mods Folder


OBSERVED RESULT

The application window merely hangs when trying to click on either of these menu items. Giving more sandbox permissions for accessing folders, dbus, etc, doesn't make a difference either.


EXPECTED RESULT

A folder will open in the desktop's file manager. This works as expected with the latest release tarball:

https://multimc.org/#Download

As well as when compiled from source, as found here:

https://github.com/MultiMC/MultiMC5


SOFTWARE/OS VERSIONS
Linux distro:    Fedora 33 Workstation
Desktop:         Gnome 3.38.1
Flatpak version: 1.8.3
Flatpak runtime: org.kde.Platform/x86_64/5.15


ADDITIONAL INFORMATION

Some debugging has led me to believe that this call to QDesktopServices::openUrl() is the cause of the hanging:

https://github.com/MultiMC/MultiMC5/blob/develop/api/gui/DesktopServices.cpp#L84

This bug may also be related to a similar regression fixed in the version of xdg-utils in the Freedesktop runtime:

https://github.com/flatpak/flatpak-xdg-utils/pull/36
Comment 1 jstone 2020-12-10 03:36:51 UTC
This behavior is apparently caused by a bug in the application itself. It's been patched and now it works as expected.