diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 30 | ||||
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 2 | ||||
-rw-r--r-- | src/client/qwaylandintegration.cpp | 2 | ||||
-rw-r--r-- | src/client/qwaylandscreen.cpp | 2 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 4 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandcompositor.cpp | 8 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurface.cpp | 8 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.cpp | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwltexturesharingextension.cpp | 8 | ||||
-rw-r--r-- | src/compositor/global/qwaylandcompositorextension.cpp | 2 | ||||
-rw-r--r-- | src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp | 4 | ||||
-rw-r--r-- | src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp | 2 | ||||
-rw-r--r-- | src/qtwaylandscanner/qtwaylandscanner.cpp | 4 | ||||
-rw-r--r-- | src/shared/qwaylandinputmethodeventbuilder.cpp | 2 |
14 files changed, 40 insertions, 40 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 9d70924c..d6889329 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -455,7 +455,7 @@ void QWaylandDisplay::checkTextInputProtocol() QWaylandScreen *QWaylandDisplay::screenForOutput(struct wl_output *output) const { - for (auto screen : qAsConst(mScreens)) { + for (auto screen : std::as_const(mScreens)) { if (screen->output() == output) return screen; } @@ -519,12 +519,12 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin #if QT_WAYLAND_TEXT_INPUT_V4_WIP mTextInputManagerv4.reset(); #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInput(nullptr); } mTextInputMethodManager.reset(new QtWayland::qt_text_input_method_manager_v1(registry, id, 1)); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInputMethod(new QWaylandTextInputMethod(this, mTextInputMethodManager->get_text_input_method(inputDevice->wl_seat()))); mWaylandIntegration->reconfigureInputContext(); mTextInputManagerIndex = mTextInputManagerList.indexOf(interface); @@ -537,12 +537,12 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin #if QT_WAYLAND_TEXT_INPUT_V4_WIP mTextInputManagerv4.reset(); #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInputMethod(nullptr); } mTextInputManagerv1.reset(new QtWayland::zwp_text_input_manager_v1(registry, id, 1)); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) { + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) { auto textInput = new QWaylandTextInputv1(this, mTextInputManagerv1->create_text_input()); textInput->setSeat(inputDevice->wl_seat()); inputDevice->setTextInput(textInput); @@ -559,12 +559,12 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin #if QT_WAYLAND_TEXT_INPUT_V4_WIP mTextInputManagerv4.reset(); #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInputMethod(nullptr); } mTextInputManagerv2.reset(new QtWayland::zwp_text_input_manager_v2(registry, id, 1)); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInput(new QWaylandTextInputv2(this, mTextInputManagerv2->get_text_input(inputDevice->wl_seat()))); mWaylandIntegration->reconfigureInputContext(); mTextInputManagerIndex = mTextInputManagerList.indexOf(interface); @@ -575,12 +575,12 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin if (mTextInputManagerIndex < INT_MAX) { mTextInputMethodManager.reset(); mTextInputManagerv2.reset(); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInputMethod(nullptr); } mTextInputManagerv4.reset(new QtWayland::zwp_text_input_manager_v4(registry, id, 1)); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInput(new QWaylandTextInputv4(this, mTextInputManagerv4->get_text_input(inputDevice->wl_seat()))); mWaylandIntegration->reconfigureInputContext(); mTextInputManagerIndex = mTextInputManagerList.indexOf(interface); @@ -595,7 +595,7 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin } } else if (interface == QLatin1String(QWaylandXdgOutputManagerV1::interface()->name)) { mXdgOutputManager.reset(new QWaylandXdgOutputManagerV1(this, id, version)); - for (auto *screen : qAsConst(mWaitingScreens)) + for (auto *screen : std::as_const(mWaitingScreens)) screen->initXdgOutput(xdgOutputManager()); forceRoundTrip(); } @@ -622,7 +622,7 @@ void QWaylandDisplay::registry_global_remove(uint32_t id) } } - for (QWaylandScreen *screen : qAsConst(mScreens)) { + for (QWaylandScreen *screen : std::as_const(mScreens)) { if (screen->outputId() == id) { mScreens.removeOne(screen); // If this is the last screen, we have to add a fake screen, or Qt will break. @@ -634,27 +634,27 @@ void QWaylandDisplay::registry_global_remove(uint32_t id) } if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v1::interface()->name)) { mTextInputManagerv1.reset(); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInput(nullptr); mWaylandIntegration->reconfigureInputContext(); } if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v2::interface()->name)) { mTextInputManagerv2.reset(); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInput(nullptr); mWaylandIntegration->reconfigureInputContext(); } #if QT_WAYLAND_TEXT_INPUT_V4_WIP if (global.interface == QLatin1String(QtWayland::zwp_text_input_manager_v4::interface()->name)) { mTextInputManagerv4.reset(); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInput(nullptr); mWaylandIntegration->reconfigureInputContext(); } #endif // QT_WAYLAND_TEXT_INPUT_V4_WIP if (global.interface == QLatin1String(QtWayland::qt_text_input_method_manager_v1::interface()->name)) { mTextInputMethodManager.reset(); - for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices)) + for (QWaylandInputDevice *inputDevice : std::as_const(mInputDevices)) inputDevice->setTextInputMethod(nullptr); mWaylandIntegration->reconfigureInputContext(); } diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 2b0d60af..0a4c434b 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -1464,7 +1464,7 @@ void QWaylandInputDevice::handleTouchPoint(int id, QEventPoint::State state, con bool QWaylandInputDevice::Touch::allTouchPointsReleased() { - for (const auto &tp : qAsConst(mPendingTouchPoints)) { + for (const auto &tp : std::as_const(mPendingTouchPoints)) { if (tp.state != QEventPoint::Released) return false; } diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 6d74de13..9ee38118 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -422,7 +422,7 @@ void QWaylandIntegration::initializeShellIntegration() preferredShells << QLatin1String("qt-shell"); } - for (const QString &preferredShell : qAsConst(preferredShells)) { + for (const QString &preferredShell : std::as_const(preferredShells)) { mShellIntegration.reset(createShellIntegration(preferredShell)); if (mShellIntegration) { qCDebug(lcQpaWayland, "Using the '%s' shell integration", qPrintable(preferredShell)); diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp index fd56a252..4f75d205 100644 --- a/src/client/qwaylandscreen.cpp +++ b/src/client/qwaylandscreen.cpp @@ -150,7 +150,7 @@ QList<QPlatformScreen *> QWaylandScreen::virtualSiblings() const list.reserve(screens.size() + (placeholder ? 1 : 0)); - for (QWaylandScreen *screen : qAsConst(screens)) { + for (QWaylandScreen *screen : std::as_const(screens)) { if (screen->screen()) list << screen; } diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 73a14b89..4fd012de 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -559,7 +559,7 @@ void QWaylandWindow::sendRecursiveExposeEvent() return; sendExposeEvent(QRect(QPoint(), geometry().size())); - for (QWaylandSubSurface *subSurface : qAsConst(mChildren)) { + for (QWaylandSubSurface *subSurface : std::as_const(mChildren)) { auto subWindow = subSurface->window(); subWindow->sendRecursiveExposeEvent(); } @@ -924,7 +924,7 @@ bool QWaylandWindow::createDecoration() } if (hadDecoration != mWindowDecorationEnabled) { - for (QWaylandSubSurface *subsurf : qAsConst(mChildren)) { + for (QWaylandSubSurface *subsurf : std::as_const(mChildren)) { QPoint pos = subsurf->window()->geometry().topLeft(); QMargins m = frameMargins(); subsurf->set_position(pos.x() + m.left(), pos.y() + m.top()); diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp index 66f5eba4..5c44f8ad 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp @@ -289,7 +289,7 @@ void QWaylandCompositorPrivate::addPolishObject(QObject *object) void QWaylandCompositorPrivate::connectToExternalSockets() { // Clear out any backlog of user-supplied external socket descriptors - for (int fd : qAsConst(externally_added_socket_fds)) { + for (int fd : std::as_const(externally_added_socket_fds)) { if (wl_display_add_socket_fd(display, fd) != 0) qWarning() << "Failed to integrate user-supplied socket fd into the Wayland event loop"; } @@ -373,14 +373,14 @@ void QWaylandCompositorPrivate::initializeHardwareIntegration() loadClientBufferIntegration(); loadServerBufferIntegration(); - for (auto *integration : qAsConst(client_buffer_integrations)) + for (auto *integration : std::as_const(client_buffer_integrations)) integration->initializeHardware(display); #endif } void QWaylandCompositorPrivate::initializeSeats() { - for (QWaylandSeat *seat : qAsConst(seats)) + for (QWaylandSeat *seat : std::as_const(seats)) seat->initialize(); } @@ -410,7 +410,7 @@ void QWaylandCompositorPrivate::loadClientBufferIntegration() QString hwIntegrationName; - for (auto targetKey : qAsConst(targetKeys)) { + for (auto targetKey : std::as_const(targetKeys)) { auto *integration = QtWayland::ClientBufferIntegrationFactory::create(targetKey, QStringList()); if (integration) { integration->setCompositor(q); diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp index 88147944..84fef3c0 100644 --- a/src/compositor/compositor_api/qwaylandsurface.cpp +++ b/src/compositor/compositor_api/qwaylandsurface.cpp @@ -101,9 +101,9 @@ QWaylandSurfacePrivate::~QWaylandSurfacePrivate() bufferRef = QWaylandBufferRef(); - for (QtWayland::FrameCallback *c : qAsConst(pendingFrameCallbacks)) + for (QtWayland::FrameCallback *c : std::as_const(pendingFrameCallbacks)) c->destroy(); - for (QtWayland::FrameCallback *c : qAsConst(frameCallbacks)) + for (QtWayland::FrameCallback *c : std::as_const(frameCallbacks)) c->destroy(); } @@ -276,7 +276,7 @@ void QWaylandSurfacePrivate::surface_commit(Resource *) // Notify buffers and views if (auto *buffer = bufferRef.buffer()) buffer->setCommitted(damage); - for (auto *view : qAsConst(views)) + for (auto *view : std::as_const(views)) view->bufferCommitted(bufferRef, damage); // Now all double-buffered state has been applied so it's safe to emit general signals @@ -705,7 +705,7 @@ QWaylandCompositor *QWaylandSurface::compositor() const void QWaylandSurface::frameStarted() { Q_D(QWaylandSurface); - for (QtWayland::FrameCallback *c : qAsConst(d->frameCallbacks)) + for (QtWayland::FrameCallback *c : std::as_const(d->frameCallbacks)) c->canSend = true; } diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index 0809c3f8..8ceb57da 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -45,7 +45,7 @@ void QWaylandXdgShellPrivate::unregisterXdgSurface(QWaylandXdgSurface *xdgSurfac QWaylandXdgSurface *QWaylandXdgShellPrivate::xdgSurfaceFromSurface(QWaylandSurface *surface) { - for (QWaylandXdgSurface *xdgSurface : qAsConst(m_xdgSurfaces)) { + for (QWaylandXdgSurface *xdgSurface : std::as_const(m_xdgSurfaces)) { if (surface == xdgSurface->surface()) return xdgSurface; } diff --git a/src/compositor/extensions/qwltexturesharingextension.cpp b/src/compositor/extensions/qwltexturesharingextension.cpp index ef8961e4..2168c414 100644 --- a/src/compositor/extensions/qwltexturesharingextension.cpp +++ b/src/compositor/extensions/qwltexturesharingextension.cpp @@ -144,7 +144,7 @@ QQuickImageResponse *QWaylandSharedTextureProvider::requestImageResponse(const Q void QWaylandSharedTextureProvider::setExtensionReady(QWaylandTextureSharingExtension *extension) { - for (auto *response : qAsConst(m_pendingResponses)) + for (auto *response : std::as_const(m_pendingResponses)) response->doRequest(extension); m_pendingResponses.clear(); m_pendingResponses.squeeze(); @@ -199,7 +199,7 @@ void QWaylandTextureSharingExtension::initialize() auto suffixes = QTextureFileReader::supportedFileFormats(); suffixes.append(QImageReader::supportedImageFormats()); - for (auto ext : qAsConst(suffixes)) + for (auto ext : std::as_const(suffixes)) m_image_suffixes << QLatin1Char('.') + QString::fromLatin1(ext); //qDebug() << "m_image_suffixes" << m_image_suffixes << "m_image_dirs" << m_image_dirs; @@ -224,13 +224,13 @@ QString QWaylandTextureSharingExtension::getExistingFilePath(const QString &key) if (key.contains(QLatin1String("../"))) return QString(); - for (auto dir : qAsConst(m_image_dirs)) { + for (auto dir : std::as_const(m_image_dirs)) { QString path = dir + key; if (QFileInfo::exists(path)) return path; } - for (auto dir : qAsConst(m_image_dirs)) { + for (auto dir : std::as_const(m_image_dirs)) { for (auto ext : m_image_suffixes) { QString fp = dir + key + ext; //qDebug() << "trying" << fp; diff --git a/src/compositor/global/qwaylandcompositorextension.cpp b/src/compositor/global/qwaylandcompositorextension.cpp index 18179177..639215fc 100644 --- a/src/compositor/global/qwaylandcompositorextension.cpp +++ b/src/compositor/global/qwaylandcompositorextension.cpp @@ -222,7 +222,7 @@ QWaylandObject::QWaylandObject(QObjectPrivate &d, QObject *parent) QWaylandObject::~QWaylandObject() { - for (QWaylandCompositorExtension *extension : qAsConst(extension_vector)) + for (QWaylandCompositorExtension *extension : std::as_const(extension_vector)) QWaylandCompositorExtensionPrivate::get(extension)->extension_container = nullptr; } diff --git a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp index 4cb6bb28..c30bf5ae 100644 --- a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp +++ b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp @@ -162,7 +162,7 @@ wl_kms_buffer *Vsp2Layer::nextKmsBuffer() void Vsp2HardwareLayerIntegration::enableVspLayers() { - for (auto &layer : qAsConst(m_layers)) { + for (auto &layer : std::as_const(m_layers)) { Q_ASSERT(!layer->isEnabled()); layer->enableVspLayer(); } @@ -225,7 +225,7 @@ void Vsp2HardwareLayerIntegration::remove(QWaylandQuickHardwareLayer *hwLayer) void Vsp2HardwareLayerIntegration::sendFrameCallbacks() { - for (auto &layer : qAsConst(m_layers)) { + for (auto &layer : std::as_const(m_layers)) { if (auto *surface = layer->hwLayer()->waylandItem()->surface()) surface->sendFrameCallbacks(); } diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp index dec94e79..f509809e 100644 --- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp +++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp @@ -32,7 +32,7 @@ void LinuxDmabuf::zwp_linux_dmabuf_v1_bind_resource(Resource *resource) // send DRM_FORMAT_MOD_INVALID when no modifiers are supported for a format if (modifiers.isEmpty()) modifiers << DRM_FORMAT_MOD_INVALID; - for (const auto &modifier : qAsConst(modifiers)) { + for (const auto &modifier : std::as_const(modifiers)) { if (resource->version() >= ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION) { const uint32_t modifier_lo = modifier & 0xFFFFFFFF; const uint32_t modifier_hi = modifier >> 32; diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp index 0e9eb0e5..f8079509 100644 --- a/src/qtwaylandscanner/qtwaylandscanner.cpp +++ b/src/qtwaylandscanner/qtwaylandscanner.cpp @@ -437,7 +437,7 @@ bool Scanner::process() printf("// This file was generated by qtwaylandscanner\n"); printf("// source file is %s\n\n", qPrintable(m_protocolFilePath)); - for (auto b : qAsConst(m_includes)) + for (auto b : std::as_const(m_includes)) printf("#include %s\n", b.constData()); auto printExportMacro = [this](const char *prefix, const QByteArray &preProcessorProtocolName) { @@ -695,7 +695,7 @@ bool Scanner::process() printf(" %s::~%s()\n", interfaceName, interfaceName); printf(" {\n"); - printf(" for (auto resource : qAsConst(m_resource_map))\n"); + printf(" for (auto resource : std::as_const(m_resource_map))\n"); printf(" resource->%s_object = nullptr;\n", interfaceNameStripped); printf("\n"); printf(" if (m_resource)\n"); diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp index dc3b0191..63803f7b 100644 --- a/src/shared/qwaylandinputmethodeventbuilder.cpp +++ b/src/shared/qwaylandinputmethodeventbuilder.cpp @@ -132,7 +132,7 @@ QInputMethodEvent *QWaylandInputMethodEventBuilder::buildPreedit(const QString & attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant())); } - for (const QInputMethodEvent::Attribute &attr : qAsConst(m_preeditStyles)) { + for (const QInputMethodEvent::Attribute &attr : std::as_const(m_preeditStyles)) { int start = indexFromWayland(text, attr.start); int length = indexFromWayland(text, attr.start + attr.length) - start; attributes.append(QInputMethodEvent::Attribute(attr.type, start, length, attr.value)); |