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

@@ -85,7 +85,7 @@ ToolBarItem* ToolBarItem::findItem(const std::string& name)
return this;
}
for (auto it : qAsConst(_items)) {
for (auto it : std::as_const(_items)) {
if (it->_name == name) {
return it;
}
@@ -138,7 +138,7 @@ void ToolBarItem::removeItem(ToolBarItem* item)
void ToolBarItem::clear()
{
for (auto it : qAsConst(_items)) {
for (auto it : std::as_const(_items)) {
delete it;
}