mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 16:04:12 +02:00
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:
@@ -243,7 +243,7 @@ void ElementInfoWidget::buildInterface()
|
||||
*/
|
||||
ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const
|
||||
{
|
||||
for (const auto &eipw : qAsConst(m_eipw_list))
|
||||
for (const auto &eipw : std::as_const(m_eipw_list))
|
||||
{
|
||||
if (eipw->key() == key)
|
||||
return eipw;
|
||||
@@ -301,7 +301,7 @@ DiagramContext ElementInfoWidget::currentInfo() const
|
||||
{
|
||||
DiagramContext info_;
|
||||
|
||||
for (const auto &eipw : qAsConst(m_eipw_list))
|
||||
for (const auto &eipw : std::as_const(m_eipw_list))
|
||||
{
|
||||
//add value only if they're something to store
|
||||
if (!eipw->text().isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user