From 2a14a4e398a222e7766337d09d6328e33b6c0277 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 18 Oct 2023 06:54:47 +0200 Subject: [PATCH] Use std::as_const here --- src/wayland/surface.cpp | 8 ++++---- src/xwayland/xwaylandlauncher.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wayland/surface.cpp b/src/wayland/surface.cpp index f137e3fc4a..56d8787e83 100644 --- a/src/wayland/surface.cpp +++ b/src/wayland/surface.cpp @@ -1152,10 +1152,10 @@ void SurfaceInterface::setPreferredBufferScale(qreal scale) d->send_preferred_buffer_scale(std::ceil(scale)); } - for (auto child : qAsConst(d->current->subsurface.below)) { + for (auto child : std::as_const(d->current->subsurface.below)) { child->surface()->setPreferredBufferScale(scale); } - for (auto child : qAsConst(d->current->subsurface.above)) { + for (auto child : std::as_const(d->current->subsurface.above)) { child->surface()->setPreferredBufferScale(scale); } } @@ -1171,10 +1171,10 @@ void SurfaceInterface::setPreferredBufferTransform(OutputTransform transform) d->send_preferred_buffer_transform(uint32_t(transform.kind())); } - for (auto child : qAsConst(d->current->subsurface.below)) { + for (auto child : std::as_const(d->current->subsurface.below)) { child->surface()->setPreferredBufferTransform(transform); } - for (auto child : qAsConst(d->current->subsurface.above)) { + for (auto child : std::as_const(d->current->subsurface.above)) { child->surface()->setPreferredBufferTransform(transform); } } diff --git a/src/xwayland/xwaylandlauncher.cpp b/src/xwayland/xwaylandlauncher.cpp index b13ed7d6e5..72b4cab631 100644 --- a/src/xwayland/xwaylandlauncher.cpp +++ b/src/xwayland/xwaylandlauncher.cpp @@ -87,7 +87,7 @@ void XwaylandLauncher::enable() m_listenFds = m_socket->fileDescriptors(); } - for (int socket : qAsConst(m_listenFds)) { + for (int socket : std::as_const(m_listenFds)) { QSocketNotifier *notifier = new QSocketNotifier(socket, QSocketNotifier::Read, this); connect(notifier, &QSocketNotifier::activated, this, [this]() { if (!m_xwaylandProcess) {