Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Remove foreach, initialize pointer
- Loading branch information
|
@@ -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; |
|
|
}; |
|
|