Skip to content
Permalink
Browse files

Further optimization of originalXmlProperties

(cherry picked from commit 6e3d45e)
  • Loading branch information
nirvn authored and nyalldawson committed Dec 21, 2020
1 parent cf34d22 commit 0b914518cd01147f27c91aa2911fa907352a81a3
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/core/layertree/qgslayertreeutils.cpp
@@ -330,14 +330,10 @@ void QgsLayerTreeUtils::storeOriginalLayersProperties( QgsLayerTreeGroup *group,
const QString id( layerElement.firstChildElement( QStringLiteral( "id" ) ).firstChild().nodeValue() );
if ( id == l->id() )
{
QDomImplementation DomImplementation;
QDomDocumentType documentType = DomImplementation.createDocumentType( QStringLiteral( "qgis" ), QStringLiteral( "http://mrcc.com/qgis.dtd" ), QStringLiteral( "SYSTEM" ) );
QDomDocument document( documentType );
document.appendChild( layerElement );
QString str;
QTextStream stream( &str );
document.save( stream, 4 /*indent*/ );
l->setOriginalXmlProperties( str );
layerElement.save( stream, 4 /*indent*/ );
l->setOriginalXmlProperties( QStringLiteral( "<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>\n%1" ).arg( str ) );
break;
}
layerElement = layerElement.nextSiblingElement( );

0 comments on commit 0b91451

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