Use std::as_const here

This commit is contained in:
Laurent Montel 2023-10-18 06:54:47 +02:00
parent 51acd6ce1d
commit 2a14a4e398
2 changed files with 5 additions and 5 deletions

View file

@ -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);
}
}

View file

@ -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) {