diff options
Diffstat (limited to 'tests/auto/client/shared')
-rw-r--r-- | tests/auto/client/shared/corecompositor.cpp | 4 | ||||
-rw-r--r-- | tests/auto/client/shared/corecompositor.h | 6 | ||||
-rw-r--r-- | tests/auto/client/shared/coreprotocol.cpp | 6 | ||||
-rw-r--r-- | tests/auto/client/shared/coreprotocol.h | 2 | ||||
-rw-r--r-- | tests/auto/client/shared/datadevice.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/shared/xdgshell.cpp | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/client/shared/corecompositor.cpp b/tests/auto/client/shared/corecompositor.cpp index 38930c54..dd7311e4 100644 --- a/tests/auto/client/shared/corecompositor.cpp +++ b/tests/auto/client/shared/corecompositor.cpp @@ -35,7 +35,7 @@ CoreCompositor::~CoreCompositor() bool CoreCompositor::isClean() { Lock lock(this); - for (auto *global : qAsConst(m_globals)) { + for (auto *global : std::as_const(m_globals)) { if (!global->isClean()) return false; } @@ -46,7 +46,7 @@ QString CoreCompositor::dirtyMessage() { Lock lock(this); QStringList messages; - for (auto *global : qAsConst(m_globals)) { + for (auto *global : std::as_const(m_globals)) { if (!global->isClean()) messages << (global->metaObject()->className() % QLatin1String(": ") % global->dirtyMessage()); } diff --git a/tests/auto/client/shared/corecompositor.h b/tests/auto/client/shared/corecompositor.h index 2edb7f3f..b7d1de78 100644 --- a/tests/auto/client/shared/corecompositor.h +++ b/tests/auto/client/shared/corecompositor.h @@ -98,7 +98,7 @@ public: global_type *get() { warnIfNotLockedByThread(Q_FUNC_INFO); - for (auto *global : qAsConst(m_globals)) { + for (auto *global : std::as_const(m_globals)) { if (auto *casted = qobject_cast<global_type *>(global)) return casted; } @@ -112,7 +112,7 @@ public: global_type *get(int index) { warnIfNotLockedByThread(Q_FUNC_INFO); - for (auto *global : qAsConst(m_globals)) { + for (auto *global : std::as_const(m_globals)) { if (auto *casted = qobject_cast<global_type *>(global)) { if (index--) continue; @@ -130,7 +130,7 @@ public: { warnIfNotLockedByThread(Q_FUNC_INFO); QList<global_type *> matching; - for (auto *global : qAsConst(m_globals)) { + for (auto *global : std::as_const(m_globals)) { if (auto *casted = qobject_cast<global_type *>(global)) matching.append(casted); } diff --git a/tests/auto/client/shared/coreprotocol.cpp b/tests/auto/client/shared/coreprotocol.cpp index 5a59938d..bb2f9888 100644 --- a/tests/auto/client/shared/coreprotocol.cpp +++ b/tests/auto/client/shared/coreprotocol.cpp @@ -144,7 +144,7 @@ void Surface::surface_frame(Resource *resource, uint32_t callback) } bool WlCompositor::isClean() { - for (auto *surface : qAsConst(m_surfaces)) { + for (auto *surface : std::as_const(m_surfaces)) { if (!CursorRole::fromSurface(surface)) { if (m_compositor->m_type != CoreCompositor::CompositorType::Legacy) return false; @@ -160,7 +160,7 @@ QString WlCompositor::dirtyMessage() if (isClean()) return "clean"; QStringList messages; - for (auto *s : qAsConst(m_surfaces)) { + for (auto *s : std::as_const(m_surfaces)) { QString role = s->m_role ? s->m_role->staticMetaObject.className(): "none/unknown"; messages << "Surface with role: " + role; } @@ -540,7 +540,7 @@ Shm::Shm(CoreCompositor *compositor, QList<format> formats, int version) bool Shm::isClean() { -// for (ShmPool *pool : qAsConst(m_pools)) { +// for (ShmPool *pool : std::as_const(m_pools)) { // //TODO: return false if not cursor buffer // if (pool->m_buffers.isEmpty()) { // return false; diff --git a/tests/auto/client/shared/coreprotocol.h b/tests/auto/client/shared/coreprotocol.h index e43451ce..35ba5b15 100644 --- a/tests/auto/client/shared/coreprotocol.h +++ b/tests/auto/client/shared/coreprotocol.h @@ -410,7 +410,7 @@ protected: void shm_create_pool(Resource *resource, uint32_t id, int32_t fd, int32_t size) override; void shm_bind_resource(Resource *resource) override { - for (auto format : qAsConst(m_formats)) + for (auto format : std::as_const(m_formats)) send_format(resource->handle, format); } }; diff --git a/tests/auto/client/shared/datadevice.cpp b/tests/auto/client/shared/datadevice.cpp index 100f937d..26ebec6b 100644 --- a/tests/auto/client/shared/datadevice.cpp +++ b/tests/auto/client/shared/datadevice.cpp @@ -7,7 +7,7 @@ namespace MockCompositor { bool DataDeviceManager::isClean() { - for (auto *device : qAsConst(m_dataDevices)) { + for (auto *device : std::as_const(m_dataDevices)) { // The client should not leak selection offers, i.e. if this fails, there is a missing // data_offer.destroy request if (!device->m_sentSelectionOffers.empty()) 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; |