Replace deprecated qAsConst with std::as_const

qAsConst was deprecated in Qt 6.6; std::as_const (C++17, already the
project standard) is the drop-in replacement. Clears 46 -Wdeprecated-
declarations warnings across 18 files. No behavioural change.
This commit is contained in:
Dieter Mayer
2026-07-12 21:44:47 +02:00
parent 5c65bf6486
commit 1265e51ebe
18 changed files with 46 additions and 46 deletions
@@ -172,7 +172,7 @@ void MoveGraphicsItemCommand::setupAnimation(QObject *target,
void MoveGraphicsItemCommand::updateConductors(bool is_redo)
{
//Recalculate the path of 'conductors_to_move'
for (const auto &conductor : qAsConst(m_content.m_conductors_to_move)) {
for (const auto &conductor : std::as_const(m_content.m_conductors_to_move)) {
conductor->updatePath();
if(conductor->textItem()->wasMovedByUser() == true){
if(is_redo)
@@ -184,7 +184,7 @@ void MoveGraphicsItemCommand::updateConductors(bool is_redo)
}
// Recalculate the path of 'conductors_to_update'
for (const auto &conductor : qAsConst(m_content.m_conductors_to_update)) {
for (const auto &conductor : std::as_const(m_content.m_conductors_to_update)) {
conductor->updatePath();
}
}