Skip to content

Commit 3198112

Browse files
committedApr 5, 2019
Remove Q_FOREACH from modeltest
1 parent 9bb6c23 commit 3198112

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎tests/qt_modeltest/dynamictreemodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ void ModelMoveCommand::doCommand()
255255

256256
for ( int column = 0; column < m_numCols; ++column )
257257
{
258-
QList<qint64> l = m_model->m_childItems.value( srcParent.internalId() )[column].mid( m_startRow, m_endRow - m_startRow + 1 );
258+
const QList<qint64> l = m_model->m_childItems.value( srcParent.internalId() )[column].mid( m_startRow, m_endRow - m_startRow + 1 );
259259

260260
for ( int i = m_startRow; i <= m_endRow ; i++ )
261261
{
@@ -272,7 +272,7 @@ void ModelMoveCommand::doCommand()
272272
d = m_destRow - ( m_endRow - m_startRow ) + 1;
273273
}
274274

275-
Q_FOREACH ( const qint64 id, l )
275+
for ( const qint64 id : l )
276276
{
277277
m_model->m_childItems[destParent.internalId()][column].insert( d++, id );
278278
}

0 commit comments

Comments
 (0)
Please sign in to comment.