Bug 427390 - Qt 5.12.9: File open dialog doesn't show up in Krita
Summary: Qt 5.12.9: File open dialog doesn't show up in Krita
Status: RESOLVED UPSTREAM
Alias: None
Product: flatpak-platform-plugin
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-06 14:29 UTC by Peter Eszlari
Modified: 2020-10-07 07:45 UTC (History)
1 user (show)

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


Attachments
dbus-monitor --session (25.36 KB, text/plain)
2020-10-06 14:29 UTC, Peter Eszlari
Details
krita non-native file dialog (80.88 KB, image/png)
2020-10-06 14:51 UTC, Peter Eszlari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eszlari 2020-10-06 14:29:38 UTC
Created attachment 132148 [details]
dbus-monitor --session

https://github.com/flathub/org.kde.krita/pull/26

flatpak install --user https://dl.flathub.org/build-repo/28379/org.kde.krita.flatpakref


quote from Dmitry Kazakov:

"2. [blocking] For some reason Krita has Preferences->Global->Miscellaneous->"Enable native file dialogs" enabled by default. It makes File->Open menu action do nothing. Even though in normal Krita build this option is disabled by this code:

if (qgetenv("XDG_CURRENT_DESKTOP") == "KDE") {
    dontUseNative = false;
}

NOTE: in the previous builds this option has also bee enabled, but KDE's file dialogs worked fine. Now they don't."
Comment 1 Jan Grulich 2020-10-06 14:39:46 UTC
There is an empty filter:
>struct {
>   string "j2k "
>   array [
>   ]
>}

Which is being rejected by xdg-desktop-portal:
>error time=1601994515.731923 sender=:1.45 -> destination=:1.72 >error_name=org.freedesktop.portal.Error.InvalidArgument reply_serial=13
>   string "invalid filter: no filters"

Can you check whether this filter is empty on Krita side?
Comment 2 Peter Eszlari 2020-10-06 14:51:57 UTC
Created attachment 132150 [details]
krita non-native file dialog
Comment 3 Jan Grulich 2020-10-06 14:59:54 UTC
Hmm, possibly this:
https://github.com/qt/qtbase/commit/d55165b9c472a30958ef392cb52234041159279e

But it should already be in Qt 5.12.
Comment 4 Jan Grulich 2020-10-06 15:05:14 UTC
And I can reproduce it even with Qt 5.15.
Comment 5 Jan Grulich 2020-10-07 06:28:22 UTC
Looks like a Krita fault:
(gdb) p nameFilter
$17 = "j2k ( )"

So we indeed get an empty filter, but in Qt we should probably just ignore those to avoid this failure.
Comment 6 Jan Grulich 2020-10-07 06:41:02 UTC
Qt fix: https://codereview.qt-project.org/c/qt/qtbase/+/316508
Comment 7 Jan Grulich 2020-10-07 07:45:16 UTC
Closing as this is a Qt issue / Krita issue and actually flatpak-platform-plugin is no longer a thing.