mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-11 00:04:27 -04:00
Catch xml import error for composition
This commit is contained in:
parent
3a1c9efb44
commit
f2f14264c9
@ -379,7 +379,13 @@ bool QgsComposition::loadFromTemplate( const QDomDocument& doc, QMap<QString, QS
|
||||
{
|
||||
xmlString = xmlString.replace( "[" + sIt.key() + "]", encodeStringForXML( sIt.value() ) );
|
||||
}
|
||||
importDoc.setContent( xmlString );
|
||||
|
||||
QString errorMsg;
|
||||
int errorLine, errorColumn;
|
||||
if ( !importDoc.setContent( xmlString, &errorMsg, &errorLine, &errorColumn ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user