Commit 04706f32 authored by David Faure's avatar David Faure

Trim filter string to be a bit tolerant and avoid empty mimetype entries

Testcase: kdialog  --getsavefilename . "text/html "

CCBUG: 381561
parent 633667a3
......@@ -216,7 +216,7 @@ static void setFileDialogFilter(QFileDialog &dlg, const QString &filter)
if (filter.contains("*")) {
dlg.setNameFilter(filter);
} else if (!filter.isEmpty()) {
dlg.setMimeTypeFilters(filter.split(' '));
dlg.setMimeTypeFilters(filter.trimmed().split(' '));
}
}
......
Markdown is supported
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