Commit 046fbdce authored by Sharaf Zaman's avatar Sharaf Zaman
Browse files

Android: don't set nameFilters when exporting

Android docs suggest two ways to pass mime info to the Storage Framework
1. Intent#setType() -- when mimetype belongs to some specific category e.g image/*
2. Intent#EXTRA_MIME_TYPES -- for disjoint ones.

But Qt always uses the first mimetype in the list as setType, which for certain
concrete mimeTypes (like image/jpeg), defaults the extension to .jpg which
we/user can't change.

BUG:429056
(cherry picked from commit 7f211e12)
parent 415c28fd
...@@ -215,6 +215,7 @@ void KoFileDialog::createFileDialog() ...@@ -215,6 +215,7 @@ void KoFileDialog::createFileDialog()
} }
} }
#ifndef Q_OS_ANDROID
d->fileDialog->setNameFilters(d->filterList); d->fileDialog->setNameFilters(d->filterList);
if (!d->proposedFileName.isEmpty()) { if (!d->proposedFileName.isEmpty()) {
...@@ -231,6 +232,7 @@ void KoFileDialog::createFileDialog() ...@@ -231,6 +232,7 @@ void KoFileDialog::createFileDialog()
else if (!d->defaultFilter.isEmpty()) { else if (!d->defaultFilter.isEmpty()) {
d->fileDialog->selectNameFilter(d->defaultFilter); d->fileDialog->selectNameFilter(d->defaultFilter);
} }
#endif
if (d->type == ImportDirectory || if (d->type == ImportDirectory ||
d->type == ImportFile || d->type == ImportFiles || d->type == ImportFile || d->type == ImportFiles ||
......
Supports Markdown
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