Skip to content
Commit efa61e7d authored by Michael Weghorn's avatar Michael Weghorn Committed by Nicolas Fella
Browse files

Don't truncate filter name containing parenthesis

When extracting the part of the string that contains the
filter name, use the part in front of the *last* parenthesis,
not the first one, since otherwise the name gets truncated
if it contains parenthesis itself, e.g. in a call like

    QFileDialog dialog;
    dialog.setNameFilters({"ODF Spreadsheet (.ods) (*.ods)"});

This is in line with the fact that
`QPlatformFileDialogHelper::cleanFilterList` just considers
those extensions in the last set of parenthesis and aligns
the behavior with the non-native QFileDialog implementation
that the Qt library itself provides, as well as the KF 5
implementation.

BUG: 483350
(cherry picked from commit 448b8aef)
parent 301594d1
Pipeline #628727 passed with stage
in 5 minutes and 42 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