https://bugs.kde.org/show_bug.cgi?id=407819

David Faure <fa...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://commits.kde.org/pla
                   |                            |sma-integration/0f529bca29b
                   |                            |a020820b0702ec5e28e9346d1e7
                   |                            |6d
             Status|REPORTED                    |RESOLVED

--- Comment #2 from David Faure <fa...@kde.org> ---
Git commit 0f529bca29ba020820b0702ec5e28e9346d1e76d by David Faure, on behalf
of Robert Hoffmann.
Committed on 27/06/2019 at 19:18.
Pushed by dfaure into branch 'Plasma/5.16'.

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.

Reviewers: #frameworks, apol, dfaure

Reviewed By: dfaure

Subscribers: michaelweghorn, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21959

M  +17   -0    autotests/kfiledialog_unittest.cpp
M  +1    -0    src/platformtheme/kdeplatformfiledialogbase_p.h
M  +9    -3    src/platformtheme/kdeplatformfiledialoghelper.cpp
M  +1    -0    src/platformtheme/kdeplatformfiledialoghelper.h
M  +5    -0    src/platformtheme/kdirselectdialog.cpp
M  +1    -0    src/platformtheme/kdirselectdialog_p.h

https://commits.kde.org/plasma-integration/0f529bca29ba020820b0702ec5e28e9346d1e76d

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to