Silence compiler warning
Don't get a QModelIndex out of a temporary QPersistentModelIndex. Pick-to: 6.6 Change-Id: Ida9e25f1a17130e19b75221e1189e6f2fccd3f27 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
This commit is contained in:
parent
bf2587d9e5
commit
c4a8c2b0d0
@ -307,7 +307,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)
|
||||
persistent.move(idx, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user