Skip to content
Permalink
Browse files

Remove foreach, initialize pointer

  • Loading branch information
nyalldawson committed Jun 9, 2018
1 parent 0a325f1 commit 404f07d4c0cd598f160aefd4ddc4bce57a1ba431
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/app/qgslayertreeviewfilterindicator.cpp
  2. +1 −1 src/app/qgslayertreeviewfilterindicator.h
@@ -175,7 +175,7 @@ void QgsLayerTreeViewFilterIndicatorProvider::addOrRemoveIndicator( QgsLayerTree
const QList<QgsLayerTreeViewIndicator *> nodeIndicators = mLayerTreeView->indicators( node );

// maybe the indicator exists already
foreach ( QgsLayerTreeViewIndicator *indicator, nodeIndicators )
for ( QgsLayerTreeViewIndicator *indicator : nodeIndicators )
{
if ( mIndicators.contains( indicator ) )
{
@@ -192,7 +192,7 @@ void QgsLayerTreeViewFilterIndicatorProvider::addOrRemoveIndicator( QgsLayerTree
const QList<QgsLayerTreeViewIndicator *> nodeIndicators = mLayerTreeView->indicators( node );

// there may be existing indicator we need to get rid of
foreach ( QgsLayerTreeViewIndicator *indicator, nodeIndicators )
for ( QgsLayerTreeViewIndicator *indicator : nodeIndicators )
{
if ( mIndicators.contains( indicator ) )
{
@@ -50,7 +50,7 @@ class QgsLayerTreeViewFilterIndicatorProvider : public QObject
void addOrRemoveIndicator( QgsLayerTreeNode *node, QgsVectorLayer *vlayer );

private:
QgsLayerTreeView *mLayerTreeView;
QgsLayerTreeView *mLayerTreeView = nullptr;
QIcon mIcon;
QSet<QgsLayerTreeViewIndicator *> mIndicators;
};

0 comments on commit 404f07d

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