summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
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/render/frontend
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/render/frontend')
-rw-r--r--src/render/frontend/qrenderaspect.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp
index 759a8f686..9fd4b1bea 100644
--- a/src/render/frontend/qrenderaspect.cpp
+++ b/src/render/frontend/qrenderaspect.cpp
@@ -475,7 +475,7 @@ void QRenderAspectPrivate::registerBackendTypes()
q->registerBackendType<QScreenRayCaster>(QSharedPointer<Render::NodeFunctor<Render::RayCaster, Render::RayCasterManager> >::create(m_renderer));
// Plugins
- for (const QString &plugin : qAsConst(m_pluginConfig))
+ for (const QString &plugin : std::as_const(m_pluginConfig))
loadRenderPlugin(plugin);
}
@@ -551,7 +551,7 @@ void QRenderAspectPrivate::unregisterBackendTypes()
unregisterBackendType<QScreenRayCaster>();
// Plugins
- for (Render::QRenderPlugin *plugin : qAsConst(m_renderPlugins))
+ for (Render::QRenderPlugin *plugin : std::as_const(m_renderPlugins))
plugin->unregisterBackendTypes(q);
}
@@ -964,7 +964,7 @@ void QRenderAspectPrivate::configurePlugin(const QString &plugin)
if (!m_pluginConfig.contains(plugin)) {
m_pluginConfig.append(plugin);
- for (QRenderAspectPrivate *instance : qAsConst(m_instances))
+ for (QRenderAspectPrivate *instance : std::as_const(m_instances))
instance->loadRenderPlugin(plugin);
}
}