summaryrefslogtreecommitdiffstats
path: root/src/input/backend/qabstractphysicaldevicebackendnode.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:10:51 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-20 12:49:19 +0200
commit168de0273447ee303cedc2640af2f994cbf0dd8e (patch)
tree20ae734a008caf8caef9f5b5986a8c003fde99e9 /src/input/backend/qabstractphysicaldevicebackendnode.cpp
parent201ca07ae23ab142ac2efcf2413adf6c243be7f7 (diff)
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I1b3c7c4058726c55199fd8ba74b6d6890ad8dd93 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/input/backend/qabstractphysicaldevicebackendnode.cpp')
-rw-r--r--src/input/backend/qabstractphysicaldevicebackendnode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/backend/qabstractphysicaldevicebackendnode.cpp b/src/input/backend/qabstractphysicaldevicebackendnode.cpp
index ad6c5e8ec..8ac6c4517 100644
--- a/src/input/backend/qabstractphysicaldevicebackendnode.cpp
+++ b/src/input/backend/qabstractphysicaldevicebackendnode.cpp
@@ -126,13 +126,13 @@ void QAbstractPhysicalDeviceBackendNode::syncFromFrontEnd(const Qt3DCore::QNode
std::inserter(removedSettings, removedSettings.end()));
d->m_currentAxisSettingIds = settings;
- for (const auto &axisSettingId: qAsConst(addedSettings)) {
+ for (const auto &axisSettingId: std::as_const(addedSettings)) {
Input::AxisSetting *axisSetting = d->getAxisSetting(axisSettingId);
const auto axisIds = axisSetting->axes();
for (int axisId : axisIds)
d->addAxisSetting(axisId, axisSettingId);
}
- for (const auto &axisSettingId: qAsConst(removedSettings))
+ for (const auto &axisSettingId: std::as_const(removedSettings))
d->removeAxisSetting(axisSettingId);
}