Skip to content

Commit

Permalink
Avoid taking reference to temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 25, 2021
1 parent 8848976 commit cb2426f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/qt_modeltest/dynamictreemodel.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit cb2426f

Please sign in to comment.