Bug 456256 - FileDialog does not honor QFileDialog::HideNameFilterDetails
Summary: FileDialog does not honor QFileDialog::HideNameFilterDetails
Status: REPORTED
Alias: None
Product: plasma-integration
Classification: Plasma
Component: general (show other bugs)
Version: git-stable-Plasma/5.24
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-02 18:53 UTC by M G Berberich
Modified: 2024-03-25 01:20 UTC (History)
2 users (show)

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


Attachments
KDE-File-Dialog not showing filters after description (37.06 KB, image/png)
2022-07-02 18:53 UTC, M G Berberich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M G Berberich 2022-07-02 18:53:59 UTC
Created attachment 150343 [details]
KDE-File-Dialog not showing filters after description

SUMMARY

The KDE file-dialog that replaces the QFileDialog on non-KDE applications does not honor the QFileDialog::HideNameFilterDetails flag of QFileDialog. 
The QFileDialog can show the filters in parentheses behind the description, p.e. “STL Mesh (*.stl)”
The KDE file dialog never shows the filter.

The transformation of the filters from QT to KDE syntax is done in /src/platformtheme/kdeplatformfiledialoghelper.cpp:qt2KdeFilter()

Always show the filter can be done by editing this function

            str << it->mid(ob + 1, (cb - ob) - 1) << '|' << it->mid(0, ob) << " (" << it->mid(ob + 1, (cb - ob) - 1) << ")";

but I think the correct way to do this would be either to have a QFileDialog::HideNameFilterDetails functionality in the kde filedialog and interface it or let KDEPlatformFileDialogHelper append the filter to the description, depending on QFileDialog::HideNameFilterDetails

STEPS TO REPRODUCE
1. Start a non-KDE_application like FreeCAD
2. Try to save something (p.e. export a object)
3. See that filters are not shown in the drop-down-box

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION