forked from qt-creator/qt-creator
Qt6: Workaround for ListModel iterators
Change-Id: I622b42b8aea4f06b62e8739f7e8abb234ed7d3b4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -67,10 +67,8 @@ public:
|
|||||||
|
|
||||||
void clear() { rootItem()->removeChildren(); }
|
void clear() { rootItem()->removeChildren(); }
|
||||||
|
|
||||||
using const_iterator = typename QVector<ChildType *>::const_iterator;
|
auto begin() const { return rootItem()->begin(); }
|
||||||
const_iterator begin() const { return const_iterator(rootItem()->begin()); }
|
auto end() const { return rootItem()->end(); }
|
||||||
const_iterator end() const { return const_iterator(rootItem()->end()); }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class ItemData>
|
template <class ItemData>
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ void InterpreterOptionsWidget::apply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<Interpreter> interpreters;
|
QList<Interpreter> interpreters;
|
||||||
for (const ListItem<Interpreter> *treeItem : m_model)
|
for (const TreeItem *treeItem : m_model)
|
||||||
interpreters << treeItem->itemData;
|
interpreters << static_cast<const ListItem<Interpreter> *>(treeItem)->itemData;
|
||||||
PythonSettings::setInterpreter(interpreters, m_defaultId);
|
PythonSettings::setInterpreter(interpreters, m_defaultId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user