summaryrefslogtreecommitdiff
path: root/tests/auto/client/shared/xdgshell.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-11-11 16:26:04 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-11-14 07:24:43 +0100
commit6935ef2f6e27e6f00ccdf17b10944fb25d19b21f (patch)
treeb8dae6d02ed1f4cba0c4170151b24fd474d52534 /tests/auto/client/shared/xdgshell.cpp
parent12062bd6783e344f6511287e369954d22cb54dee (diff)
downloadqtwayland-6935ef2f6e27e6f00ccdf17b10944fb25d19b21f.tar.gz
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. This is a 6.4 re-run of the script we ran in dev, in order to avoid conflicts between the branches when cherry-picking. Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/client/shared/xdgshell.cpp')
-rw-r--r--tests/auto/client/shared/xdgshell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/client/shared/xdgshell.cpp b/tests/auto/client/shared/xdgshell.cpp
index b50f36e7..eb9a1e87 100644
--- a/tests/auto/client/shared/xdgshell.cpp
+++ b/tests/auto/client/shared/xdgshell.cpp
@@ -14,7 +14,7 @@ XdgWmBase::XdgWmBase(CoreCompositor *compositor, int version)
XdgToplevel *XdgWmBase::toplevel(int i)
{
int j = 0;
- for (auto *xdgSurface : qAsConst(m_xdgSurfaces)) {
+ for (auto *xdgSurface : std::as_const(m_xdgSurfaces)) {
if (auto *toplevel = xdgSurface->m_toplevel) {
if (j == i)
return toplevel;
@@ -27,7 +27,7 @@ XdgToplevel *XdgWmBase::toplevel(int i)
XdgPopup *XdgWmBase::popup(int i)
{
int j = 0;
- for (auto *xdgSurface : qAsConst(m_xdgSurfaces)) {
+ for (auto *xdgSurface : std::as_const(m_xdgSurfaces)) {
if (auto *popup = xdgSurface->m_popup) {
if (j == i)
return popup;