diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp index 3b672d8005c..49bf0788393 100644 --- a/src/controllers/dlgprefcontroller.cpp +++ b/src/controllers/dlgprefcontroller.cpp @@ -853,7 +853,7 @@ void DlgPrefController::slotShowMapping(std::shared_ptr if (pLayout != nullptr && !settings.isEmpty()) { m_ui.groupBoxSettings->layout()->addWidget(pLayout->build(m_ui.groupBoxSettings)); - for (const auto& setting : qAsConst(settings)) { + for (const auto& setting : std::as_const(settings)) { connect(setting.get(), &AbstractLegacyControllerSetting::changed, this, diff --git a/src/controllers/legacycontrollermapping.cpp b/src/controllers/legacycontrollermapping.cpp index 9f6a400e9dd..198487fa2f7 100644 --- a/src/controllers/legacycontrollermapping.cpp +++ b/src/controllers/legacycontrollermapping.cpp @@ -26,7 +26,7 @@ void LegacyControllerMapping::loadSettings(UserSettingsPointer pConfig, QList definedSettings = pConfig->getKeysWithGroup(controllerKey); QList availableSettingKeys; - for (const auto& pSetting : qAsConst(availableSettings)) { + for (const auto& pSetting : std::as_const(availableSettings)) { availableSettingKeys.append(pSetting->variableName()); } diff --git a/src/controllers/legacycontrollermapping.h b/src/controllers/legacycontrollermapping.h index df2a534adbc..45fe89df260 100644 --- a/src/controllers/legacycontrollermapping.h +++ b/src/controllers/legacycontrollermapping.h @@ -91,7 +91,7 @@ class LegacyControllerMapping { VERIFY_OR_DEBUG_ASSERT(option->valid()) { return false; } - for (const auto& setting : qAsConst(m_settings)) { + for (const auto& setting : std::as_const(m_settings)) { if (*setting == *option) { qWarning() << "Mapping setting duplication detected for " "setting with name" diff --git a/src/controllers/legacycontrollersettings.cpp b/src/controllers/legacycontrollersettings.cpp index 56f41fcd1f9..ea9efe4dbbb 100644 --- a/src/controllers/legacycontrollersettings.cpp +++ b/src/controllers/legacycontrollersettings.cpp @@ -197,7 +197,7 @@ void LegacyControllerEnumSetting::parse(const QString& in, bool* ok) { save(); size_t pos = 0; - for (const auto& value : qAsConst(m_options)) { + for (const auto& value : std::as_const(m_options)) { if (std::get<0>(value) == in) { if (ok != nullptr) { *ok = true; @@ -213,7 +213,7 @@ void LegacyControllerEnumSetting::parse(const QString& in, bool* ok) { QWidget* LegacyControllerEnumSetting::buildInputWidget(QWidget* pParent) { auto* pComboBox = new QComboBox(pParent); - for (const auto& value : qAsConst(m_options)) { + for (const auto& value : std::as_const(m_options)) { pComboBox->addItem(std::get<1>(value)); } pComboBox->setCurrentIndex(static_cast(m_editedValue)); diff --git a/src/controllers/legacycontrollersettingsfactory.h b/src/controllers/legacycontrollersettingsfactory.h index ae5488f59c8..433a8b7495d 100644 --- a/src/controllers/legacycontrollersettingsfactory.h +++ b/src/controllers/legacycontrollersettingsfactory.h @@ -43,7 +43,7 @@ class LegacyControllerSettingBuilder { /// @return an instance if a a supported setting has been found, null /// otherwise static AbstractLegacyControllerSetting* build(const QDomElement& element) { - for (const auto& settingType : qAsConst(instance()->m_supportedSettings)) { + for (const auto& settingType : std::as_const(instance()->m_supportedSettings)) { if (settingType.matcher(element)) { return settingType.builder(element); } diff --git a/src/controllers/scripting/legacy/controllerscriptenginelegacy.cpp b/src/controllers/scripting/legacy/controllerscriptenginelegacy.cpp index faad865b5c5..66cb55b4a06 100644 --- a/src/controllers/scripting/legacy/controllerscriptenginelegacy.cpp +++ b/src/controllers/scripting/legacy/controllerscriptenginelegacy.cpp @@ -102,7 +102,7 @@ void ControllerScriptEngineLegacy::setScriptFiles( void ControllerScriptEngineLegacy::setSettings( const QList>& settings) { m_settings.clear(); - for (const auto& pSetting : qAsConst(settings)) { + for (const auto& pSetting : std::as_const(settings)) { QString name = pSetting->variableName(); VERIFY_OR_DEBUG_ASSERT(!name.isEmpty()) { continue;