D21249: Test current filter before setting a new one
Jan-Marek Glogowski
noreply at phabricator.kde.org
Fri May 17 15:09:34 BST 2019
jglogowski created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
jglogowski requested review of this revision.
REVISION SUMMARY
If KFileWidget's filter list has two matching filters for an extension,
it will always select the first filter, even if the current filter
already matches the file name.
This is fine, if you auto-select the filter to match the file name, but
breaks, if you want to auto-change the file name's extension via the
selected filter.
So this checks, if the current filter already matches the file name
before trying to find a matching filter and select it.
BUG: 407642
TEST PLAN
1. Compile and run the attached program to the bug report 407642
2. Make sure that "auto extension" checkbox is enable
3. Select the last file filter (DocBook (.xml)) via dropdown list
OBSERVED RESULT
Filter is "Word 2003 XML (.xml)"
EXPECTED RESULT
Filter is "DocBook (.xml)"
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D21249
AFFECTED FILES
src/filewidgets/kfilewidget.cpp
To: jglogowski
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190517/86cc79c0/attachment.html>
More information about the Kde-frameworks-devel
mailing list