mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Remove foreach, initialize pointer
This commit is contained in:
parent
0a325f1eda
commit
404f07d4c0
@ -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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user