Don't truncate filter name containing parenthesis
requested to merge michaelweghorn/plasma-integration:michaelweghorn/dont_truncate_file_filter_name_with_parenthesis into master
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.