Bug 456256

Summary: FileDialog does not honor QFileDialog::HideNameFilterDetails
Product: [Plasma] plasma-integration Reporter: M G Berberich <kde>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: nate, olib141
Priority: NOR    
Version First Reported In: git-stable-Plasma/5.24   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: KDE-File-Dialog not showing filters after description

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