Skip to content
Permalink
Browse files

Catch xml import error for composition

  • Loading branch information
mhugent committed Sep 28, 2012
1 parent 3a1c9ef commit f2f14264c919d60252c3ca60d239faf3b762b85e
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/core/composer/qgscomposition.cpp
@@ -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
{

0 comments on commit f2f1426

Please sign in to comment.
You can’t perform that action at this time.