Use std::as_const here

master
Laurent Montel 11 months ago
parent 51acd6ce1d
commit 2a14a4e398

@ -1152,10 +1152,10 @@ void SurfaceInterface::setPreferredBufferScale(qreal scale)
d->send_preferred_buffer_scale(std::ceil(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); 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); child->surface()->setPreferredBufferScale(scale);
} }
} }
@ -1171,10 +1171,10 @@ void SurfaceInterface::setPreferredBufferTransform(OutputTransform transform)
d->send_preferred_buffer_transform(uint32_t(transform.kind())); 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); 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); child->surface()->setPreferredBufferTransform(transform);
} }
} }

@ -87,7 +87,7 @@ void XwaylandLauncher::enable()
m_listenFds = m_socket->fileDescriptors(); 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); QSocketNotifier *notifier = new QSocketNotifier(socket, QSocketNotifier::Read, this);
connect(notifier, &QSocketNotifier::activated, this, [this]() { connect(notifier, &QSocketNotifier::activated, this, [this]() {
if (!m_xwaylandProcess) { if (!m_xwaylandProcess) {

Loading…
Cancel
Save