From kde-bugs-dist Thu Nov 30 21:18:21 2017 From: Alexander Date: Thu, 30 Nov 2017 21:18:21 +0000 To: kde-bugs-dist Subject: [kfile] [Bug 387481] New: Save file dialog doesn't return selected filter properly Message-Id: X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=151207671613915 https://bugs.kde.org/show_bug.cgi?id=3D387481 Bug ID: 387481 Summary: Save file dialog doesn't return selected filter properly Product: kfile Version: unspecified Platform: openSUSE RPMs OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: kdelibs-bugs@kde.org Reporter: ashaduri@gmail.com Target Milestone: --- I'm using plain Qt5 applications and since I'm running Plasma, KDE dialogs= =20 automatically replace Qt's built-in dialogs. The problem is with the Save dialog (QFileDialog::getSaveFileName()). If the "filter" parameter contains 2 filters with the same extensions, the "selectedFilter" parameter is always set to the first one, no matter which = one the user selected. Example code: -------------------------- QString selectedFilter; QString fileName =3D QFileDialog::getSaveFileName(this, "QFileDialog::getSaveFileName()", "hello.txt", "All Files (*);;UTF-16 Files (*.txt);;UTF-8 Files (*.txt)", &selectedFilter); qWarning() << "selectedFilter: " << selectedFilter; -------------------------- If the user selects "UTF-8 Files (*.txt)", "UTF-16 Files (*.txt)" is printed instead. Qt's built-in dialog don't have this problem. Thanks --=20 You are receiving this mail because: You are watching all bug changes.=