FileChooser portal: Make sure filter.name is not empty
Xdg-desktop-portal will reject any OpenFile request if there is an empty filter, so if we can't find the mimetype in the mimedatabase we just use it's "raw name" Pick-to: 6.6 6.5 5.15 Change-Id: I705ae7523445e5c2ec97a42ee334401bc90adb68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
00c1c04bd5
commit
88c74240a8
@ -213,6 +213,9 @@ void QXdgDesktopPortalFileDialog::openPortal(Qt::WindowFlags windowFlags, Qt::Wi
|
||||
filter.name = mimeType.comment();
|
||||
filter.filterConditions = filterConditions;
|
||||
|
||||
if (filter.name.isEmpty())
|
||||
filter.name = mimeTypefilter;
|
||||
|
||||
filterList << filter;
|
||||
|
||||
if (!d->selectedMimeTypeFilter.isEmpty() && d->selectedMimeTypeFilter == mimeTypefilter)
|
||||
|
Loading…
Reference in New Issue
Block a user