summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove QWindow forward declarations in namespacesFriedemann Kleint2023-02-132-2/+0
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Idc0d0baeef4b92f61ed67d9a850b5ad3422f9146 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Disambiguate input method constantsFriedemann Kleint2023-02-133-8/+8
| | | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I13b33c894818d8aebce763eaf6c961d806961a63 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Disambiguate static variablesFriedemann Kleint2023-02-138-24/+24
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ia6e293fa30d788f8abd52bf675f11d7d0151259f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Fix documentation warningsTopi Reinio2023-02-071-1/+1
| | | | | | | | | | | * Wiggly example has been removed. * Remove broken link to 'macros' from QWaylandQuickExtension header reference as unnecessary. Pick-to: 6.5 Change-Id: I17c9db09e7d0a649ab3a37ed867d4f81e039d485 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Do not use deprecated QSharedMemory constructorFabian Kosmale2023-02-011-1/+1
| | | | | | Change-Id: Ic2c2ee4256aa16ebfeb51b3c2f7a3430d4104091 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* compositor: Fix crash when raising shell surface itemEskil Abrahamsen Blomfeldt2023-01-301-4/+7
| | | | | | | | | | | | | | | | This was introduced by d89c8920f3b82dd2098971b5a66c4b9c75da5af0. The raise() function would search for a suitable surface, but failing to find one, it would search past the end of the childItems list and cause memory corruption. [ChangeLog][QtWaylandCompositor] Fixed an issue where the compositor would sometimes crash if a shell surface item was brought to front. Pick-to: 6.4 6.5 Fixes: QTBUG-109051 Change-Id: I2249f0881b90fc05b5f0292cd35c6524db4663c5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* client: Fix infinite recursion with text-input-v2Eskil Abrahamsen Blomfeldt2023-01-301-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible to get into an infinite recursion when double-clicking an entry in an item view to edit it. What would happen is that the editor takes focus, and we call commit on the input method commit in case the previous focused widget has pending input that needs to be committed. The subsequent method event then causes the QAbstractItemView to set focus, and since we have not yet updated the focus in the previous call, we end up in an infinite recursion, eventually crashing when the stack overflows. As a guard for this, we only send an input method event when there is actually pre-edit text to commit, and we reset the pre-edit text immediately so that any subsequent call will just exit. [ChangeLog][QtWaylandClient] Fixed a possible crash when editing a field in an item view. Pick-to: 5.15 6.2 6.4 6.5 Fixes: QTBUG-109302 Change-Id: I45237c80e53b1386705279899e19319180d78fa1 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Inho Lee <inho.lee@qt.io>
* Don't change process locale while initializing QWaylandInputContextIlya Fedin2023-01-261-3/+1
| | | | | | | | | | This was overriding the locale previously set in QCoreApplicationPrivate::initLocale and can switch the process to non-UTF8 codepage Pick-to: 6.5 6.4 6.2 Change-Id: I5cd6664d1a7c315019d6c798b33b9deb33982a59 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* client: Attempt to request activate even if there's no focus windowIlya Fedin2023-01-251-2/+6
| | | | | | | | | The compositor is likely to display some indication even if the activation fails, so it's helpful to always do the request. Pick-to: 6.5 6.4 Change-Id: Ia3a8075e471d5a4b619f420ee166e7146f1229b8 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
* QWaylandTabletSeatV2: Do not leak tablet informationAleix Pol2023-01-241-0/+3
| | | | | | | | Clean up after the information we allocated, this way address sanitizer doesn't complain about it leaking. Change-Id: Ib7ade93d6585b8c6be6a71d0497801d9cfe75d2f Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandDataOffer: Save double look-upAleix Pol2023-01-241-2/+3
| | | | | | | Only look up the value on the QHash once. Change-Id: I7c7c2f72bb1aa8fad0d374d5ea84c093ea5a2f01 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Manage QMimeData lifecycleTang Haixiang2023-01-094-13/+22
| | | | | | | | | | | | QMimeData is created by user, it is not taken care of in qtwayland, which will cause memory leak. It is now handled in qtwayland that when a new QMimeData is set, the previous QMimeData is freed. Change-Id: Ic502021fe700c7ee10454d94f0d1868901809af7 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Client: Fix handling of Qt::BlankCursorVlad Zahorodnii2023-01-051-2/+1
| | | | | | | | | | | | | | The cursor may not be properly set when a window has Qt::BlankCursor and it's shown. In that case, the cursor surface may not be present and wl_pointer.set_cursor won't be called. On the other hand, wl_pointer.set_cursor must be always called when wl_pointer.enter is received. Pick-to: 6.5 Change-Id: I8540e7a02df1579b3380a1a1d4cfab42c1ab3104 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Client: Port to QPlatformTheme::{MouseCursorTheme,MouseCursorSize}Vlad Zahorodnii2023-01-032-18/+17
| | | | | | | | | | It allows the platform theme to specify the preferred cursor theme and cursor size without resorting to hacks such as setting XCURSOR_THEME and XCURSOR_SIZE environment variables. Pick-to: 6.5 Change-Id: I9e44f9c6dddbb5d730f8ac092f2c11fdbccf8d27 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Add WL_SHM_FORMAT_RGB888 to supported shm formatsThomas Senyk2022-12-132-1/+9
| | | | | | | | | | In addition a new entry in QWaylandCompositor::ShmFormat allows compositors to enable that format at runtime Pick-to: 6.5 Change-Id: I0f894adb3f688458a65713e343127fbcb26f8b65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Client: Handle zwp_primary_selection_device_manager_v1 global removalVlad Zahorodnii2022-12-132-5/+9
| | | | | | | | | | | The zwp_primary_selection_device_manager_v1 global can be withdrawn if the compositor disables the primary selection, i.e. middle click to paste selected text. QtWayland needs to handle that; otherwise the app can crash. Pick-to: 6.5 Change-Id: Idbb4db18b605f85a5951fa12c1bdf61898b0d123 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* compositor: fix build without quickLiang Qi2022-12-095-0/+21
| | | | | Change-Id: Ic9ff039028e509c3e09d446f85648fe063f4749f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Provide support for custom shellsVlad Zahorodnii2022-12-083-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, an application can use only one shell surface protocol at a time. However, there are applications that need to use more than one shell surface protocol, e.g. xdg-shell + layer-shell. layer-shell can be used for the desktop background window, and xdg-shell for popups, etc. This change introduces an API in QWaylandWindow that allows specifying the shell integration per window. Custom shell code needs to call QWaylandWindow::setShellIntegration() while the window is unmapped. By default, QWaylandWindow will use QWaylandDisplay's shell integration plugin. This change should be source compatible with existing shell integration plugins deployed in the wild. If the custom shell wants to track additional state for the window, it should do it using its own means. Perhaps we could improve this in the future releases of Qt. [ChangeLog][QtWaylandClient] It is possible to run Qt applications using more than one shell surface protocol, e.g. xdg-shell + layer-shell. Change-Id: Id0458b32af623f114c06d51d0d21ad06efd69328 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* client: Implement QNativeInterface::Private::QWaylandWindowDavid Redondo2022-12-0812-7/+50
| | | | | | | Task-number: QTBUG-94729 Change-Id: Ib79f3199a4518700aa032c5ca4760a2b53c401e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Implement fractional_scale_v1 and wp_viewportDavid Edmundson2022-12-0711-7/+372
| | | | | | | | | | | | | This allows compositors to hint a non-integer scale to use on a window which we can hook to Qt's existing fractional scaling support. The viewport is used to communicate the relationship between buffer size and logical size to the compositor. It is a non-integer alternative to wl_buffer_scale Change-Id: I1a850f1bcd40e8d04e241e18a538b11f18bc671c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* compositor: Support touch interaction with client decorationsEskil Abrahamsen Blomfeldt2022-12-072-13/+33
| | | | | | | | | | | | | | | | | | | | The client tells us when the title bar has been pressed and it has started a move, but we only actually updated the position of the window for mouse events. This adds touch event support for this, but only for a single touch point. Since there is no way of knowing which touch point actually triggered the move, we just assume it is the first. This could cause some odd behavior if you try interacting with the window frame with two fingers at the same time, but not beyond what you would expect. [ChangeLog][QtWaylandCompositor] It is now possible to move windows using client-side decorations with touch input as well as mouse input. Fixes: QTBUG-108690 Change-Id: I23ce1e39a26be5b1b5a5ac93d8f38cc59685aa96 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* compositor: Fix warning on damage/damage_buffer mixEskil Abrahamsen Blomfeldt2022-12-072-27/+22
| | | | | | | | | | | | | | | | | The damage() request has been deprecated in favor of the damage_buffer() request, which is the one we use in Qt 6 as long as the version is 4 or higher. See change: 314fd6db51277224cdc799b039ef79db1101f5cd. However, eglSwapBuffers() will in some drivers still send the old request, causing us to get a mix of incompatible requests, since they are in different coordinate systems. We need to store these separately so that we can apply them both correctly once we get a commit. Fixes: QTBUG-108765 Change-Id: I9bbe0c87731847a4fa1927957dfd8945bd49c474 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor_api: delete TexProvider properlyInho Lee2022-12-072-2/+21
| | | | | | | | | | | If a QuickItem used in a compositor has a texture provider, it is not destroyed before deleting QRhi. It makes a warning of unreleased resources. Fixes: QTBUG-108767 Pick-to: 6.4 Change-Id: Id86839f1de1ff4f374170627d9c1e02c4afb7301 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Improve handling of 0xH and Wx0 xdg_toplevel configure eventsVlad Zahorodnii2022-12-051-8/+27
| | | | | | | | | The compositor can send a configure event with 0xH and Wx0 when it wants the window to have some concrete size along one dimension but wants the client to pick the size along the other dimension. Change-Id: I2e72017d4a71b19a930da24fa5c58b6ce672fb94 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Allow resizing with touch input on client-side decorationsEskil Abrahamsen Blomfeldt2022-12-051-37/+80
| | | | | | | | | | | | | | | | | | The touch input for client-side decorations had its own handling which only processed button clicks and moves. This meant that it was impossible to resize windows using touch events. This generalizes the mouse input code path and uses it for touch as well. We need to take care not to update any mouse state in the case of touch, since we only care about touch press events, so we pass in a PointerType and disable parts of the code path when the input is from a touch device. [ChangeLog][QtWaylandClient] Enable resizing windows using client-side decorations with touch input as well as mouse input. Task-number: QTBUG-108690 Change-Id: I761ebb0c7c4844c52f793caa74e8606d1593757f Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Fix frame sync related to unprotected multithread accessWeng Xuetian2022-12-032-32/+43
| | | | | | | | | | | | | | There is a few crashes happens in real life that frame callback is double-free'd and hit an assertion in wayland-client. e.g. https://bugs.kde.org/show_bug.cgi?id=450003 This is due to the WaylandEventThread and calls to QWaylandWindow::reset may free and unset the mFrameCallback at the same time. mFrameSyncMutex should be used to protect such access. Pick-to: 6.4 Change-Id: Ie01d08d07a2f10f70606ed1935caac09cb4f0382 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Honor QGuiApplication::overrideCursor()Vlad Zahorodnii2022-11-301-1/+4
| | | | | | | | | | | If there's a QGuiApplication::overrideCursor(), QWindow::cursor() can still return a different cursor. This can result in a wrong cursor when the pointer enters a window. Pick-to: 6.4 6.2 5.15 Fixes: QTBUG-75919 Change-Id: I015117b4b6d252b421ab14bd8f2a8f582f7cae52 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Improve examplesBernd Weimer2022-11-251-2/+4
| | | | | | | | | Updated signal handlers to new syntax to reduce noise (warnings). Allowed to build examples with subfolders in one step, updated from deprecated WlShell to XdgShell, etc. Change-Id: If821363ffd1b38ea1d152f5a044b0609cf739014 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Bump wl_output versionVlad Zahorodnii2022-11-221-1/+1
| | | | | | | wl_output_release is available starting with wl_output v3. Change-Id: I21822b26728ffb9318f1f8b4bd82ef7329682838 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Call wl_output_release() upon QWaylandScreen destructionVlad Zahorodnii2022-11-221-0/+2
| | | | | | | It ensures that the proxy gets destroyed. Change-Id: I915cc8814e33dd3b0405b2bf82bd12ce6b5f785b Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Add F_SEAL_SHRINK seal to shm backing fileVlad Zahorodnii2022-11-181-1/+7
| | | | | | | | | | This lets libwayland-server avoid installing a SIGBUS handler when it wants to mmap() the backing file and access the contents of shared memory client buffers. Change-Id: Id0b17f729799535d73e8700c5a99c32fd88a068a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* tests: fix tst_seatv4 to use 24 as default cursor sizeLiang Qi2022-11-081-1/+1
| | | | | | | | | | | | Also set default cursor size to 24 for client, which is correct both on KDE and GNOME at least. Fixes: QTBUG-104259 Pick-to: 6.4 6.2 5.15 Change-Id: Ie4ba27695974025b093a86d8c96fb23d25ad23f7 Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove uneeded forceRoundTrip on XdgOutputManagerDavid Edmundson2022-11-081-1/+0
| | | | | | | | | | In the first rountrip we will get all wl_outputs and the xdg_output_manager. Therefore we know we will have called wl_output.bind and xdg_output_manager_get_output by the time we hit the second roundtrip on startup. Change-Id: I69f911c13f9bcdfb59b04eceea4bcca778e7755c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add dependencies of wayland protocolsInho Lee2022-11-072-0/+6
| | | | | | | | Some macros are missing DEPENDS for add_custom_commands Fixes: QTBUG-108142 Change-Id: Ifacb2ea9bf3003c10dd407a8c77fc06b893b6a65 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Implement QNativeInterface::Private::QWaylandScreenDavid Redondo2022-11-031-2/+9
| | | | | | Change-Id: I2f5cc638f33fe0d884146342516efa7ce8474478 Task-number: QTBUG-94729 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Always use blocking write for data_source.sendInho Lee2022-11-011-0/+8
| | | | | | | | | | | | | QtWaylandClient assumes that data_source's fd is BLOCKING, but some compositors (e.g. mutter) pass an fd with O_NONBLOCK set. In this case, 'write' is not guaranteed to process all of the passed data in one call. Instead of dealing with such partial writes, remove O_NONBLOCK. Fixes: QTBUG-107076 Pick-to: 6.4 6.2 5.15 Change-Id: Ieb446da9fdfbaaa55100f573b396ee449cadc463 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Disable/fix warningsJonas Karlsson2022-10-281-0/+3
| | | | | | | | missing-field-initializers and unused variable Change-Id: I1a5ceaf53ec706786c73eecab0c002fa9153b962 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Implement QNativeInterface::QWaylandApplicationDavid Redondo2022-10-272-4/+71
| | | | | | | Task-number: QTBUG-94729 Change-Id: I84f080719c6364137368bdd1759947a6d6ef2e5b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Add support for xdg_toplevel.configure_boundsVlad Zahorodnii2022-10-263-22/+162
| | | | | | | | | | | | | | Currently, QtWayland doesn't know about work area size, which can create a problem where some windows don't fit into the screen area or work area. With the xdg_toplevel.configure_bounds event, the compositor can indicate the client the recommended maximum window geometry size. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/41 Change-Id: I5214aba9f144d091a2afe639de94b8d717c42fdc Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Add support for high-resolution scrollingVlad Zahorodnii2022-10-263-37/+227
| | | | | | | | | | | | | | | With wl_pointer version 8, the axis_discrete event is replaced with the axis_value120 event. The main difference between axis_discrete and axis_value120 is that the latter carries scroll deltas that can be fractions of 120, e.g. 30, etc. See also https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/72 Change-Id: I4f724ead7ba146dde6d8975fa4edfcfca761769d Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Implement window alert with xdg-activationIlya Fedin2022-10-237-4/+52
| | | | | | | | | | This is implemented by not specifying serial, as mentioned in https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/9#note_854977 Tested on KDE Plasma Change-Id: I4ef0975040bbce581b615b0318f90601e080235c Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port to new Q_UNREACHABLE_RETURN()Marc Mutz2022-10-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator to convert sequences of Q_UNREACHABLE() + return into Q_UNREACHABLE_RETURN(), newly added to qtbase. const std::string unr = "unr", val = "val", ret = "ret"; auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(", ifBound(val, cat(node(val)), cat("")), ")"); auto ignoringSwitchCases = [](auto stmt) { return anyOf(stmt, switchCase(subStmt(stmt))); }; makeRule(stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)), nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))), {changeTo(node(unr), cat(makeUnreachableReturn, ";")), // TODO: why is the ; lost w/o this? changeTo(node(ret), cat(""))}, cat("use ", makeUnreachableReturn)); a.k.a qt-use-unreachable-return. subStmt() and nextStmt() are non-standard matchers. Change-Id: I3855b2dc8523db1ea860f72ad9818738162495c6 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Allow to run wayland-scanner without --include-core-onlyVolker Krause2022-10-181-3/+6
| | | | | | | | | | | There are Wayland protocols for which using this option doesn't result in compilable code. Examples are input-method-unstable-v1 and linux-dmabuf-v1. Pick-to: 6.4 Change-Id: I06dea12dea1058fb6bd99522aa4278c36d271d4e Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I7b606de94889497a7ee7daebd01e6443a89a60d5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Adapt module to work with the new syncqtAlexey Edelev2022-10-1210-0/+26
| | | | | | | | | Add dependencies to WaylandCompositor_sync_headers for the qml plugin targets. Add deprecation macros. Fix syncqt warnings. Task-number: QTBUG-87480 Change-Id: I0e169344c9a8186484fbb36f5ec1e03cd38ea19b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add private header filters to the qt_interal_add_module callsAlexey Edelev2022-10-124-0/+8
| | | | | | | | | | This is required to filter the generated wayland files when syncing headers. Task-number: QTBUG-103196 Change-Id: I86d440bf8b56802dff2fa75ba621c37a8daa8bbf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-1014-40/+40
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: Ia64c6615ee81f7ad5d0658449b0ee347c3db8c29 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port from container::count() and length() to size()Marc Mutz2022-10-1016-32/+32
| | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: I574208abc90a8042b500b3f96e3862b0ff339eb6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Fix syncqt warningsLuca Di Sera2022-10-102-2/+2
| | | | | | Change-Id: I739eb81ec78a071baa85d24f26bb45b184b9068c Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Replace qExchange with std::exchangeMarc Mutz2022-10-062-3/+3
| | | | | | | | | | None of these users require C++20 constexpr or C++23 noexcept, the only remaining difference between std::exchange and qExchange. Task-number: QTBUG-99313 Change-Id: Ic5a0bd36d715af2cbc5f9936fdff665ee6eeea4e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>