Skip to content

Commit

Permalink
Fix some loop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 9, 2020
1 parent 83ddb39 commit aff8f78
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/labeling/qgsvectorlayerlabelprovider.cpp
Expand Up @@ -630,7 +630,7 @@ void QgsVectorLayerLabelProvider::drawLabelPrivate( pal::LabelPosition *label, Q
{
const QgsTextCharacterFormat c = lf->characterFormat( label->getPartId() );
const QStringList multiLineList = QgsPalLabeling::splitToLines( txt, tmpLyr.wrapChar, tmpLyr.autoWrapLength, tmpLyr.useMaxLineLengthForAutoWrap );
for ( const QString line : multiLineList )
for ( const QString &line : multiLineList )
document.append( QgsTextBlock( QgsTextFragment( line, c ) ) );
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/core/mesh/qgsmeshlayer.cpp
Expand Up @@ -546,11 +546,11 @@ void QgsMeshLayer::applyClassificationOnScalarSettings( const QgsMeshDatasetGrou
units = meta.extraOptions()[ QStringLiteral( "units" )];

QVector<QVector<double>> bounds;
for ( const QString classe : classes )
for ( const QString &classe : classes )
{
QStringList boundsStr = classe.split( ',' );
QVector<double> bound;
for ( const QString boundStr : boundsStr )
for ( const QString &boundStr : boundsStr )
bound.append( boundStr.toDouble() );
bounds.append( bound );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfileutils.cpp
Expand Up @@ -191,7 +191,7 @@ QStringList QgsFileUtils::findFile( const QString &file, const QString &basePath


const QFileInfoList subdirs = folder.entryInfoList( QDir::AllDirs );
for ( const QFileInfo subdir : subdirs )
for ( const QFileInfo &subdir : subdirs )
{
if ( ! searchedFolder.contains( subdir.absolutePath() ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectordataprovider.cpp
Expand Up @@ -639,7 +639,7 @@ QStringList QgsVectorDataProvider::availableEncodings()
std::call_once( initialized, [ = ]
{
const auto codecs { QTextCodec::availableCodecs() };
for ( const QString &codec : codecs )
for ( const QByteArray &codec : codecs )
{
sEncodings << codec;
}
Expand Down

0 comments on commit aff8f78

Please sign in to comment.