Skip to content
Permalink
Browse files

Q_FOREACH use to iterate over joins info

  • Loading branch information
pblottiere committed Jul 2, 2017
1 parent 3e2d9c5 commit e52414ea9dfd68fae3f6da9bd1205794abeb7ecf
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/core/qgsvectorlayerjoinbuffer.cpp
@@ -398,15 +398,13 @@ QList<const QgsVectorLayerJoinInfo *> QgsVectorLayerJoinBuffer::joinsWhereFieldI
{
QList<const QgsVectorLayerJoinInfo *> infos;

for ( int i = 0; i < mVectorJoins.count(); i++ )
Q_FOREACH ( const QgsVectorLayerJoinInfo &info, mVectorJoins )
{
const QgsVectorLayerJoinInfo *info = &( mVectorJoins[i] );

if ( infos.contains( info ) )
if ( infos.contains( &info ) )
continue;

if ( info->targetFieldName() == field.name() )
infos.append( info );
if ( info.targetFieldName() == field.name() )
infos.append( &info );
}

return infos;

0 comments on commit e52414e

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