Skip to content
Permalink
Browse files

Less autos

  • Loading branch information
elpaso committed Nov 9, 2020
1 parent 093b0a1 commit 003ca548737c863a6bcd05d081c9efb1ec47d6df
Showing with 3 additions and 432 deletions.
  1. +3 −3 src/core/layertree/qgslayertreenode.cpp
  2. +0 −429 src/gui/layertree/qgslayertreeview.h
@@ -50,9 +50,9 @@ QgsLayerTreeNode::~QgsLayerTreeNode()

QList<QgsLayerTreeNode *> QgsLayerTreeNode::abandonChildren()
{
auto orphans { mChildren };
const QList<QgsLayerTreeNode *> orphans { mChildren };
mChildren.clear();
for ( auto orphan : orphans )
for ( auto orphan : qgis::as_const( orphans ) )
{
orphan->makeOrphan( );
}
@@ -251,7 +251,7 @@ void QgsLayerTreeNode::insertChildrenPrivate( int index, QList<QgsLayerTreeNode
{
QgsLayerTreeNode *node = nodes.at( i );

const auto orphans { node->abandonChildren() };
const QList<QgsLayerTreeNode *> orphans { node->abandonChildren() };

emit willAddChildren( this, index + i, index + i );
mChildren.insert( index + i, node );

0 comments on commit 003ca54

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