Closed eszlari closed 3 years ago
This is a bug in Qt, not in Pencil2D, and it seems to be unrelated to the one in OBS. It does not affect Qt 5.14 because 5.14 did not support the current_filter option at all.
For the record, here’s what happens under the hood: When Qt prepares the SaveFile method call on the FileChooser interface, it goes through all of the supplied filters, “converts” them to the format required by that method, and appends them to a list. When the current filter is the one that should be initially selected in the dialog (current_filter, or selectedFilter in Qt’s terms) then it also saves a reference to the list entry it just added. In this particular case, the selected filter is the very first in the list, so after it saves that reference it continues to add more entries to the filter list. But in order to do that, the list needs to be resized, and when that happens, the selectedFilter reference becomes invalid, which results in this issue. (Edit: The relevant code is here)
Unfortunately, it looks like we can’t even work around that bug in Pencil2D without effectively removing that functionality unconditionally for everyone. Unless you really need to update the runtime to 5.15 now, it’s probably better to wait until Qt gets a proper fix for this. I’ll submit a bug report to them tomorrow.
Bug report submitted: QTBUG-87143
fixed upstream: https://codereview.qt-project.org/c/qt/qtbase/+/316375
back ported to runtime: https://invent.kde.org/packaging/flatpak-kde-runtime/-/merge_requests/27
I wanted to update Pencil2D on Flathub to KDE runtime 5.15 (with Qt 5.15). Unfortunately, this lead to a regression with the file open/save dialog, which won't show up anymore.
I made v0.6.5 compiled against Qt 5.15 available through Flathub's beta branch, so everyone can reproduce it:
OBS studio had a similar bug, that was fixed in this PR: https://github.com/obsproject/obs-studio/pull/2797