mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[layouts] Better error messages when atlas exports fail, hinting that path may be invalid and using correct file format
This commit is contained in:
parent
516705417d
commit
3abbb47527
@ -439,7 +439,7 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToImage( QgsAbstractLay
|
||||
if ( result != Success )
|
||||
{
|
||||
if ( result == FileError )
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application." ).arg( filePath );
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application or may be an invalid path." ).arg( QDir::toNativeSeparators( filePath ) );
|
||||
iterator->endRender();
|
||||
return result;
|
||||
}
|
||||
@ -566,7 +566,7 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToPdf( QgsAbstractLayou
|
||||
if ( result != Success )
|
||||
{
|
||||
if ( result == FileError )
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application." ).arg( fileName );
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application or may be an invalid path." ).arg( QDir::toNativeSeparators( fileName ) );
|
||||
iterator->endRender();
|
||||
return result;
|
||||
}
|
||||
@ -616,7 +616,7 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToPdfs( QgsAbstractLayo
|
||||
if ( result != Success )
|
||||
{
|
||||
if ( result == FileError )
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application." ).arg( filePath );
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application or may be an invalid path." ).arg( QDir::toNativeSeparators( filePath ) );
|
||||
iterator->endRender();
|
||||
return result;
|
||||
}
|
||||
@ -981,7 +981,7 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToSvg( QgsAbstractLayou
|
||||
if ( result != Success )
|
||||
{
|
||||
if ( result == FileError )
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application." ).arg( filePath );
|
||||
error = QObject::tr( "Cannot write to %1. This file may be open in another application or may be an invalid path." ).arg( QDir::toNativeSeparators( filePath ) );
|
||||
iterator->endRender();
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user