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

            Bug ID: 407642
           Summary: KFileWidget selects the the wrong filter on filter
                    change with enabled automatic extensions
           Product: frameworks-kio
           Version: 5.54.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Open/save dialogs
          Assignee: fa...@kde.org
          Reporter: glo...@fbihome.de
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

Created attachment 120135
  --> https://bugs.kde.org/attachment.cgi?id=120135&action=edit
Simple test file picker program

If your filter list has two matching filters for an extension, KFileWidget will
always select the first filter, even if the current filter already matches the
file name.

The result is that a user selects a filter and it's not honored by the UI. This
resulted in two bugs in LibreOffice with the KDE backend:

* https://bugs.documentfoundation.org/show_bug.cgi?id=125267
* https://bugs.documentfoundation.org/show_bug.cgi?id=120950

Our workaround is now to ignore the returned filter string.
This bug doesn't happen with the non-native QFileDialog.

STEPS TO REPRODUCE
1. Compile and run the attached program
2. Make sure that "auto extension" checkbox is enable
2. Select the last file filter (DocBook (.xml)) via dropdown list

OBSERVED RESULT
Filter is "Word 2003 XML (.xml)"

EXPECTED RESULT
Filter is "DocBook (.xml)"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian Buster with KIO 5.54

I already have a patch for this.

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

Reply via email to