Skip to content
Permalink
Browse files

Avoid taking reference to temporary

  • Loading branch information
m-kuhn committed Mar 25, 2021
1 parent 8848976 commit cb2426fc02cc80b349a9185cf9402016f35db9ef
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/qt_modeltest/dynamictreemodel.cpp
@@ -279,7 +279,7 @@ void ModelChangeChildrenLayoutsCommand::doCommand()
// changing any children of that parent. The reason is that we're keeping parent1 and parent2
// around as QPersistentModelIndex instances, and we query idx.parent() in the loop.
QModelIndexList persistent = m_model->persistentIndexList();
for ( const QModelIndex &parent : parents )
for ( const QPersistentModelIndex &parent : parents )
{
int idx = persistent.indexOf( parent );
if ( idx != -1 )

0 comments on commit cb2426f

Please sign in to comment.