Bug 348213

Summary: KFileDialog fails to be a proper system file dialog replacement for Qt4's QFileDialog
Product: [Applications] kfile Reporter: Antony Lee <anntzer.lee>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Antony Lee 2015-05-25 18:59:07 UTC
Qt4's QFileDialog staticmethods (getOpenFileName, etc.) use the system file dialogs by default (KFileDialog).  Unfortunately, KFileDialog does not respect the "selectedFilter" parameter.

Reproducible: Always

Steps to Reproduce:
1. Run: python3 -c 'from PyQt4.Qt import QApplication, QFileDialog; app = QApplication([]); QFileDialog.getOpenFileNameAndFilter(filter="Source (*.py);;Text (*.txt)", initialFilter="Text (*.txt)")'

Actual Results:  
A file dialog appears with "Source" as default filter.

Expected Results:  
A file dialog appears with "Text" as default filter.

Running Arch Linux standard packages.
Comment 1 Nate Graham 2018-04-09 21:14:30 UTC
Does this reproduce using the KDE Frameworks 5 version?
Comment 2 Antony Lee 2018-04-09 22:16:13 UTC
The issue indeed appears to be fixed as of now.