Skip to content
Commit adad3bec authored by Nicolas Fella's avatar Nicolas Fella Committed by David Faure
Browse files

Restore old behavior for KFileFilterCombo::setFilter

fb2a2268 refactored it to use the newly introduced KFileFilter
class to parse the input. However, it actually allows input that is not a valid filter string expression.

For example K3B uses filters like "audio/x-wav |Wave Sound Files", which are now parsed incorrectly.

Also, contrary to KFileWidget's filter strings slashes were allowed unescapted, which broke Krita.

K3B's usage of KFileFilterCombo for this is somewhat questionable, but we should not break it regardless.

Longer-term setFilter should be replaced with API that takes a KFileFilter object to avoid such confusion

Revert the implementation of setFilter to the original one. For setMimeFilter the usage of KFileFilter is fine.
That means we now have separate codepaths for when setFilter and setMimeFilter was called. Longer-term there will
be only one using KFileFilter

BUG: 463309
parent fb34ef03
Pipeline #304181 passed with stage
in 1 hour, 10 minutes, and 3 seconds
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