Skip to content

Commit b3d5f27

Browse files
committedJan 18, 2019
Constify
1 parent c17dc43 commit b3d5f27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/core/layertree/qgslayertreemodellegendnode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ QSizeF QgsLayerTreeModelLegendNode::drawSymbolText( const QgsLegendSettings &set
9292
double textHeight = settings.fontHeightCharacterMM( symbolLabelFont, QChar( '0' ) );
9393
double textDescent = settings.fontDescentMillimeters( symbolLabelFont );
9494

95-
QStringList lines = settings.splitStringForWrapping( data( Qt::DisplayRole ).toString() );
95+
const QStringList lines = settings.splitStringForWrapping( data( Qt::DisplayRole ).toString() );
9696

9797
labelSize.rheight() = lines.count() * textHeight + ( lines.count() - 1 ) * ( settings.lineSpacing() + textDescent );
9898

@@ -111,7 +111,7 @@ QSizeF QgsLayerTreeModelLegendNode::drawSymbolText( const QgsLegendSettings &set
111111
labelY += textHeight;
112112
}
113113

114-
for ( QStringList::Iterator itemPart = lines.begin(); itemPart != lines.end(); ++itemPart )
114+
for ( QStringList::ConstIterator itemPart = lines.constBegin(); itemPart != lines.constEnd(); ++itemPart )
115115
{
116116
labelSize.rwidth() = std::max( settings.textWidthMillimeters( symbolLabelFont, *itemPart ), double( labelSize.width() ) );
117117

0 commit comments

Comments
 (0)
Please sign in to comment.