Commit e9c81a26 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix empty warnings when using filters that cannot use QIoDevices

If a filter uses a library that handles the file creation, we
cannot use QSaveFile, so we shouldn't try to use it.

BUG:393850
parent 4abcae8e
......@@ -613,15 +613,17 @@ KisImportExportFilter::ConversionStatus KisImportExportManager::doExportImpl(con
KisImportExportFilter::ConversionStatus status =
filter->convert(m_document, &file, exportConfiguration);
if (status != KisImportExportFilter::OK) {
file.cancelWriting();
} else {
if (!file.commit()) {
status = KisImportExportFilter::CreationError;
if (filter->supportsIO()) {
if (status != KisImportExportFilter::OK) {
file.cancelWriting();
} else {
if (!file.commit()) {
status = KisImportExportFilter::CreationError;
}
}
}
return status;
}
#include <KisMimeDatabase.h>
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