Skip to content
Commit 0f529bca authored by Robert Hoffmann's avatar Robert Hoffmann Committed by David Faure
Browse files

Fix selectedNameFilter() multiple matches

Summary:
If your filter list has two matching filters for an extension, KFileWidget
will return the name of the first filter when calling
QFileDialog::selectedNameFilter(), even if the second filter was selected
in the dialog.

This is a follow-up for https://phabricator.kde.org/D21249

Test Plan:
1. Compile and run the attached program to the bug report 407819
2. Make sure that "auto extension" checkbox is enabled
3. Select the last file filter (DocBook (.xml)) via dropdown list
4. Click "Save"
5. Check program output

Result without this patch:
The output is "Word 2003 XML (.xml) (*.xml)"

Result with this patch applied:
The output should be "DocBook (.xml) (*.xml)", since this was selected in the file dialog.

BUG: 407819

Reviewers: #frameworks, apol, dfaure

Reviewed By: dfaure

Subscribers: michaelweghorn, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21959
parent 5907749f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment