Skip to content

Commit

Permalink
Replaced deprecated Q_FOREACH with for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
MieWinstrup authored and nyalldawson committed Apr 5, 2018
1 parent 98621d7 commit 40abe14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/layertree/qgslayertreeviewdefaultactions.cpp
Expand Up @@ -363,7 +363,8 @@ void QgsLayerTreeViewDefaultActions::moveToTop()
{
QMap <QgsLayerTreeGroup *, int> groupInsertIdx;
int insertIdx;
Q_FOREACH ( QgsLayerTreeNode *n, mView->selectedNodes() )
const QList< QgsLayerTreeNode * > selectedNodes = mView->selectedNodes();
for ( QgsLayerTreeNode *n : selectedNodes )
{
QgsLayerTreeGroup *parentGroup = qobject_cast<QgsLayerTreeGroup *>( n->parent() );
QgsLayerTreeNode *clonedNode = n->clone();
Expand Down

0 comments on commit 40abe14

Please sign in to comment.