Fix backwards-compatible Qt6 warnings

This commit is contained in:
Johannes Wüller
2024-05-06 15:27:06 +02:00
committed by Chris Hennes
parent 5b4eeb29a9
commit 33e91421b5
22 changed files with 44 additions and 43 deletions

View File

@@ -489,7 +489,7 @@ void DocumentModel::slotChangeObject(const Gui::ViewProviderDocumentObject& obj,
auto doc_index = static_cast<DocumentIndex*>(d->rootItem->child(row));
QList<ViewProviderIndex*> views;
doc_index->findViewProviders(obj, views);
for (const auto & view : qAsConst(views)) {
for (const auto & view : std::as_const(views)) {
DocumentModelIndex* parentitem = view->parent();
QModelIndex parent = createIndex(0,0,parentitem);
int row = view->row();
@@ -523,7 +523,7 @@ void DocumentModel::slotChangeObject(const Gui::ViewProviderDocumentObject& obj,
// get all occurrences of the view provider in the tree structure
QList<ViewProviderIndex*> obj_index;
doc_index->findViewProviders(obj, obj_index);
for (const auto & it : qAsConst(obj_index)) {
for (const auto & it : std::as_const(obj_index)) {
QModelIndex parent = createIndex(it->row(),0,it);
int count_obj = it->childCount();
beginRemoveRows(parent, 0, count_obj);