https://bugs.kde.org/show_bug.cgi?id=481287
Bug ID: 481287 Summary: Name filters don't work with native KF6 file dialog Classification: Frameworks and Libraries Product: frameworks-kio Version: git master Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Open/save dialogs Assignee: kio-bugs-n...@kde.org Reporter: m.wegh...@posteo.de CC: kdelibs-b...@kde.org Target Milestone: --- Created attachment 165804 --> https://bugs.kde.org/attachment.cgi?id=165804&action=edit Sample program to reproduce the bug SUMMARY QFileDialog allows the use of named filters, e.g. QFileDialog::setNameFilters to set filters and QFileDialog::selectedNameFilter to retrieve the currently selected filter. However, QFileDialog::selectedNameFilter currently always returns an empty string instead of the actually selected filter when using the native implementation on KF6. The KF5 one works as expected. STEPS TO REPRODUCE 1. compile attached sample program main.cpp with Qt 6 and run it on KDE Plasma 6 2. in the native file dialog that shows up, select a file that matches the file pattern (e.g. the file main.cpp itself) 3. click "Open" 4. check the output on stderr OBSERVED RESULT The returned filter is empty: > selected filter: "" EXPECTED RESULT The actually selected filter should be returned: > selected filter: "All C++ files (*.cpp *.cc *.C *.cxx *.c++)" This works as expected when building against Qt 5 instead (so that the KF 5 version is used) or explicitly disabling the use of the native KF 6 implementation by setting the QFileDialog::DontUseNativeDialog option on the dialog (s. line 15 in the sample program, recompile with that line uncommented to make it work). SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 6.0.80 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.1 Kernel Version: 6.5.0-17-generic (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i7-8850H CPU @ 2.60GHz Memory: 11,4 GiB of RAM Graphics Processor: llvmpipe Manufacturer: QEMU Product Name: Standard PC (Q35 + ICH9, 2009) System Version: pc-q35-7.2 ADDITIONAL INFORMATION This bug breaks saving files in LibreOffice when using the kf6 integration and was originally reported there: https://bugs.documentfoundation.org/show_bug.cgi?id=159701 -- You are receiving this mail because: You are watching all bug changes.