Preserve video filename and mime from cloud data.

This commit is contained in:
John Preston 2017-05-08 17:13:16 +03:00
parent 038361a1e9
commit 3156dc0f1a
1 changed files with 9 additions and 2 deletions

View File

@ -1123,8 +1123,15 @@ QString documentSaveFilename(const DocumentData *data, bool forceSavingAs = fals
caption = lang(lng_save_audio);
prefix = qsl("audio");
} else if (data->isVideo()) {
name = already.isEmpty() ? qsl(".mov") : already;
filter = qsl("MOV Video (*.mov);;") + FileDialog::AllFilesFilter();
name = already.isEmpty() ? data->name : already;
if (name.isEmpty()) {
name = pattern.isEmpty() ? qsl(".mov") : pattern.replace('*', QString());
}
if (pattern.isEmpty()) {
filter = qsl("MOV Video (*.mov);;") + FileDialog::AllFilesFilter();
} else {
filter = mimeType.filterString() + qsl(";;") + FileDialog::AllFilesFilter();
}
caption = lang(lng_save_video);
prefix = qsl("video");
} else {