Skip to content

Commit f3c92fa

Browse files
committed
Constify
1 parent c50d36c commit f3c92fa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/core/qgsproject.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -901,14 +901,14 @@ bool QgsProject::_getMapLayers( const QDomDocument &doc, QList<QDomNode> &broken
901901
if ( depSorter.hasCycle() || depSorter.hasMissingDependency() )
902902
return false;
903903

904-
QVector<QDomNode> sortedLayerNodes = depSorter.sortedLayerNodes();
904+
const QVector<QDomNode> sortedLayerNodes = depSorter.sortedLayerNodes();
905905

906906
int i = 0;
907-
Q_FOREACH ( const QDomNode &node, sortedLayerNodes )
907+
for ( const QDomNode &node : sortedLayerNodes )
908908
{
909-
QDomElement element = node.toElement();
909+
const QDomElement element = node.toElement();
910910

911-
QString name = translate( QStringLiteral( "project:layers:%1" ).arg( node.namedItem( QStringLiteral( "id" ) ).toElement().text() ), node.namedItem( QStringLiteral( "layername" ) ).toElement().text() );
911+
const QString name = translate( QStringLiteral( "project:layers:%1" ).arg( node.namedItem( QStringLiteral( "id" ) ).toElement().text() ), node.namedItem( QStringLiteral( "layername" ) ).toElement().text() );
912912
if ( !name.isNull() )
913913
emit loadingLayer( tr( "Loading layer %1" ).arg( name ) );
914914

0 commit comments

Comments
 (0)