summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input
Commit message (Collapse)AuthorAgeFilesLines
* Fix Flickable not working on VxWorksKarim Pinter2025-08-254-119/+127
| | | | | | | | | | | | Forwarding evdev events individually caused multiple events to share identical timestamps, leading to Qt failing to distinguish press and release actions. This change introduces buffering and compression, similar to the Linux evdev mouse handler, to ensure accurate event timing and recognition. Task-number: QTBUG-138806 Pick-to: 6.8 6.9 6.10 Change-Id: I54aac2ae02cfbaf736b13785a36a9df8efa902c5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add qt.qpa.input.mouse logging category to QLibInputPointerShawn Rutledge2025-07-251-0/+7
| | | | | Change-Id: I67f0a6a2c6481cc0e71c8afe50e4fb05912c34f9 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix incorrect condition when reading Y axis rangePawel Lopko2025-07-211-1/+1
| | | | | | | | | | | | | | | | The condition for reading the Y axis range incorrectly uses `rangeXOverride` instead of `rangeYOverride`. As a result, the range is still queried from the device even when an explicit Y range override is provided in the configuration. Additionally, overriding only range Y is ignored. Caused by commit: 276ccda2f3e96984b392c0429a5da8b804baacdf Pick-to: 6.9 6.10 Task-number: QTBUG-115777 Change-Id: I448e45b6b6c46276e02ffa2a9ee383327dc585bd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Reland: CMake: Annotate some qt_find_package calls with MODULEAlexandru Croitor2025-06-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A qt_find_package call first tries to find a Config package with the CONFIG mode option, and if not found, falls back to an arg-less mode which searches both Config and Find modules. For some packages, we know we want to find the Find module because there can't be a Config package, e.g our FindWrap modules or any of the other Find modules we carry in our cmake directory. So we should annotate these calls with MODULE. Aside from slightly faster configuration, there is another reason to do so. Future versions of CMake will automatically log find_package calls that have a state change (e.g. Not Found -> Found) into CMakeConfigureLog.yaml. Due to the Config-first logic in qt_find_package, we always unset the Foo_DIR variable if the Config package is not found. This means that there will be a constant build up of not-found messages in the log. Explicitly annotating the calls with MODULE will prevent this. Do that. This commit relands f1a59e974f013fcf8629d8cbacab58d895523100 This reverts commit 0ce82b78a35026cb56ff76d1c24b311008934a53. Pick-to: 6.10 Change-Id: I5d37579d2f4957215ce1475b5c0ec8509d77c83d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Revert "CMake: Annotate some qt_find_package calls with MODULE"Alexandru Croitor2025-06-191-4/+4
| | | | | | | | | | | | | | | | | | | This breaks reconfiguring Qt in various ways, one of which is CMake Error at cmake/QtTargetHelpers.cmake:1557 (message): PkgConfig::ATSPI2 is not a valid target. This happens because pkg_check_modules sets ATSPI2_FOUND to 1, so qt_find_package thinks it shouldn't find the FindATSPI2.cmake module, which ends up not creating the ATSPI2 target. This reverts commit f1a59e974f013fcf8629d8cbacab58d895523100. Pick-to: 6.10 Fixes: QTBUG-137870 Change-Id: Ica74a236c6b1bb9d7ca9af29175cb2e84a93251b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Annotate some qt_find_package calls with MODULEAlexandru Croitor2025-06-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A qt_find_package call first tries to find a Config package with the CONFIG mode option, and if not found, falls back to an arg-less mode which searches both Config and Find modules. For some packages, we know we want to find the Find module because there can't be a Config package, e.g our FindWrap modules or any of the other Find modules we carry in our cmake directory. So we should annotate these calls with MODULE. Aside from slightly faster configuration, there is another reason to do so. Future versions of CMake will automatically log find_package calls that have a state change (e.g. Not Found -> Found) into CMakeConfigureLog.yaml. Due to the Config-first logic in qt_find_package, we always unset the Foo_DIR variable if the Config package is not found. This means that there will be a constant build up of not-found messages in the log. Explicitly annotating the calls with MODULE will prevent this. Do that. Pick-to: 6.10 Change-Id: I465b015ac18f8a09b9a5c86cec7b6312a0bfbdf1 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Pass VxWorks touch ranges via environment variableMichał Łoś2025-03-211-6/+35
| | | | | | | | | | | | | | | | | | Some VxWorks touch device drivers return improper value of min and max ranges in both axes (both 0 for both axes). This makes any touch point position equal to (0, 0), making touch unusable in Qt. [ChangeLog][Platform Specific Changes][VxWorks] The user can now override touch ranges that the driver returns, by setting the new parameters "rangex" and "rangey" on the environment variable QT_QPA_VXEVDEV_TOUCHSCREEN_PARAMETERS with comma-separated min and max touch ranges for X and Y axis respectively. For example, add rangex=10,815:rangey=15,1024 Pick-to: 6.9 Task-number: QTBUG-115777 Change-Id: I4f4aba7ee66e76b80438888697f84c4db9896c3d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* libinput: Fix developer build without xkbcommonRobert Löhning2025-01-311-0/+2
| | | | | | | | | | Before this fix, the build failed with: error: unused variable 'REPEAT_DELAY' [-Werror,-Wunused-const-variable] error: unused variable 'REPEAT_RATE' [-Werror,-Wunused-const-variable] Pick-to: 6.9 6.8 Change-Id: I44a76e2270c1f5d8af6bd018869db5e30e40ecbb Reviewed-by: Liang Qi <liang.qi@qt.io>
* Replace qgetenv() calls converted to QString with qEnvironmentVariable()Thiago Macieira2025-01-015-8/+8
| | | | | | | | It's slightly more efficient. Pick-to: 6.9 Change-Id: Id5ac04fc27eee108c8e5fffd786c3d5f793a0a9d Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* libinput: Print qsizetype through %PRIdQSIZETYPEUlf Hermann2024-11-061-1/+2
| | | | | | | | | | Otherwise it's wrong where qsizetype is 32bit. Amends commit 3941fe697b9fea633f85321031ece765c532d46d. Pick-to: 6.8 Change-Id: If80b01bb188659509c42f950e803de9e1f36400a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Introduce vxtouch pluginMichał Łoś2024-10-315-0/+1157
| | | | | | | | | | | | | | Introduce VxTouch input plugin. Due to VxWorks containing implementation of library "compatible", but not identical and with slightly different ABI, with Unix/Linux evdev, create plugin based on evdevtouch, which would be used when QT_FEATURE_vxworksevdev is detected, instead of evdev. Task-number: QTBUG-115777 Change-Id: I96405c6db2caca3c102f543f0173cfdb44dc5b2b Reviewed-by: Karim Pinter <karim.pinter@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Extract QEvdevTouchFilter to shared classesMichał Łoś2024-10-303-9/+13
| | | | | | | | | | | | | | `QEvdevTouchFilter` is not specific to evdev, but we will need it in a separate plugin. Extract this class to header in input/shared, rename it to `QTouchFilter` and add header guards. This is a preparatory change to introduce VxWorks-specific touch handler. Task-number: QTBUG-115777 Change-Id: Ia39844fe91f0d6e9f85a39f37be39b6ecdf9cda9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Karim Pinter <karim.pinter@qt.io>
* Enable device discovery using VxWorks evdevMichał Łoś2024-10-301-0/+4
| | | | | | | | | | | | | | Provide VxWorks-specific implementation of keyboard and mouse device discovery, and enable usage of VxWorks evdev implementation on this platform. Note that currently code requires using VxWorks compatible mode of input devices in VxWorks, optimized mode is not supported. Task-number: QTBUG-115777 Change-Id: Ibd18c416f1c870ec02820c1001e5d129e4485dab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Karim Pinter <karim.pinter@qt.io>
* Introduce VxKeyboard input pluginMichał Łoś2024-10-306-0/+1592
| | | | | | | | | | | | | | | | | | Introduce VxKeyboard plugin which is responsible for handling keyboard on VxWorks OS. Due to the fact that VxWorks is using its own, not fully compatible with Unix/Linux implementation of libevdev, it requires it's own plugin. This way, changes in evdev plugins will not be blocked/complicated by VxWorks stalled implementation. Implement VxKeyboard plugin and its backend, adding support for it in eglfs. This is a preparatory change, as there is no keyboard detection for VxWorks yet. Task-number: QTBUG-115777 Change-Id: I4ca5729c6f210fb7477bc31371a137071e12fdad Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* evdev: Do not take m_prevInvalid into account with absolute coordinatesTuomas Vaarala2024-10-301-7/+5
| | | | | | | | | | | If QT_QPA_EVDEV_MOUSE_PARAMETERS=abs is used to force qevdevmousehandler to use absolute coordinates, the first event coordinates are incorrect (0,0) Fixes: QTBUG-86104 Pick-to: 6.8 Change-Id: I9352e809a4a62b15adcf279b00f2d07a72257012 Reviewed-by: Janne Roine <janne.roine@qt.io>
* Introduce QVxMousePluginMichał Łoś2024-10-225-21/+297
| | | | | | | | | | | | | | | Since VxWorks evdev implementation should be treated as a separate entity, extract current code for handling evdev mouse and create a separate plugin which will use VxWorks version of evdev. This will allow to separate evolution of actual evdev from VxWorks. This is a preparatory change, no mouse detection will be added with this patch yet. Task-number: QTBUG-115777 Change-Id: Icb62aeca8f091f58efd3c731eb35d6a0695a591d Reviewed-by: Karim Pinter <karim.pinter@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Extract QEvdevKeyboardMap to shared headerMichał Łoś2024-10-185-118/+148
| | | | | | | | | | | We need `QEvdevKeyboardMap` in to-be-created plugin. Extract it to separate header in shared. This is a preparatory change. Task-number: QTBUG-115777 Change-Id: I0d646eb2f357e1f1a49be357d145eb3224987441 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Extract QKeycodeAction from QEvdevKeyboardMichał Łoś2024-10-184-39/+68
| | | | | | | | | | | | We will need this enum in newly created plugin, extract it to shared. In order to prevent exposing enum fields to Qt namespace, change `enum` to `enum class`, adjust code accordingly. This is a preparatory change. Task-number: QTBUG-115777 Change-Id: I8ea804b78dc7eb93d871f46c8fd9a2f3e83455fa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Extract toQtModifiers to place where it belongsMichał Łoś2024-10-162-16/+17
| | | | | | | | | | | | | | `QEvdevKeyboardHandler` contains static method `toQtModifiers` which is not operating on any of its internal fields or types. This indicates that this method doesn't belong to this class, and in fact it should be moved to `QEvdevKeyboardMap` where types used in it are declared. Move this static method to `QEvdevKeyboardMap` namespace. This is a preparatory change to extract `QEvdevKeyboardMap` to separate header. Task-number: QTBUG-115777 Change-Id: Ibe88b40a56fb96772d903498611777b3ec19dded Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Extract QFdContainer from QEvdevKeyboardHandlerMichał Łoś2024-10-155-22/+59
| | | | | | | | | | | | Extract `QFdContainer` class from `QEvdevKeyboardHandler` header, as it will be used by other handlers. This is a preparatory change. Task-number: QTBUG-115777 Change-Id: Ia0a9fd905de44464322eb2e314b7e29774cece67 Reviewed-by: Karim Pinter <karim.pinter@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* qtslib: use Q_STATIC_LOGGING_CATEGORYThiago Macieira2024-09-071-1/+1
| | | | | | | | | | | | | Because the deprecation warning tells us to do so: qloggingcategory.h:168:67: warning: ‘const QLoggingCategory& qLcTsLib() [with <template-parameter-1-1> = void]’ is deprecated: Use Q_STATIC_LOGGING_CATEGORY or add either Q_DECLARE_LOGGING_CATEGORY or QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY in a header [-Wdeprecated-declarations] qtslib.cpp:20:20: note: declared here 20 | Q_LOGGING_CATEGORY(qLcTsLib, "qt.qpa.input") | ^~~~~~~~ Pick-to: 6.8 Change-Id: I2034c98d322bce24f56afffdb92821930dcf5683 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Enable mouse handling on VxWorksMichał Łoś2024-08-203-1/+171
| | | | | | | | | | | | Provide implementation of QEvdevMouseHandler for VxWorks OS. This is a preparatory change before actually using this handler, as Qt is not supporting evdev on VxWorks yet. Pick-to: 6.8 Task-number: QTBUG-115777 Change-Id: Ie92418c903a54ea1d6683e08762d4cc88c4956ac Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Straighten out various logging categoriesUlf Hermann2024-06-1913-14/+22
| | | | | | | | | | | | Either make them static or declare them in a header. We want them to be static wherever possible, in order to reduce the number of visible symbols. If they can't be static, however, they should at least be declared in only one place. Task-number: QTBUG-67692 Change-Id: I6f3b596ed4f0adc9873dd0a5f54f055a991a6207 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove redundant qtimer.h includesAhmad Samir2024-06-111-1/+0
| | | | | | | | | | | | | | If QTimer isn't used in the file where it's included, remove the include. Fix files that depended on transitive includes. QMacPanGestureRecognizer: drive by change: classes inheriting from QObject should have Q_OBJECT macro in the definition. Change-Id: Ia8d71f4195a1ca643c9fcb14db41877413348d98 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* libinput: Allow setting touchscreen matrix via env varShawn Rutledge2024-04-091-0/+28
| | | | | | | | | | | | [ChangeLog][QtGui][libinput] The environment variable QT_QPA_LIBINPUT_TOUCH_MATRIX now can be set with a string of 6 space-separated numbers to set the touchscreen transformation matrix. See docs for libinput_device_config_calibration_set_matrix() Fixes: QTBUG-68698 Change-Id: I72ba94e1ee6d39d31d1689ce6ce85fa8e676ff13 Reviewed-by: Dominik Holland <dominik.holland@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix -Wimplicit-fallthrough for clangTim Blechmann2024-03-011-0/+1
| | | | | | | | | | | | | | | | | | | Clang's `-Wimplicit-fallthrough` warnings are a little stricter than gcc's interpretation: switch (i) { case 0: foo(); case 4: break; } While gcc accepts the implicit fallthrough, if the following statement is a trivial `break`, clang will warn about it. Pick-to: 6.7 Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce NO_GENERATE_CPP_EXPORTS argument for qt_internal_add_moduleAlexey Edelev2024-02-091-0/+1
| | | | | | | | | | | The argument is inverted GENERATE_CPP_EXPORTS argument. Use it explicitly for the modules that do not require the autogenerated cpp exports. Task-number: QTBUG-90492 Change-Id: Ic67772ba9ed5e40f132a97e7d6844102ad023ff3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tslib: generate event with correct buttons and event typeSamuli Piippo2023-11-081-3/+6
| | | | | | | | | | | | Tslib doesn't give button and movements events separately, so send the first event with pressure as MouseButtonPress, subsequent events as MouseMove and event without pressure as MouseButtonRelease. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-111952 Fixes: QTBUG-113307 Change-Id: I7ed6e37936887e11affb254d2fca74c79b6a43b9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Include what you need: <QPointer>Marc Mutz2023-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I3321cccdb41ce0ba6d8a709cea92427aba398254 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QEvdevTouchScreenData: use string view types moreAnton Kudryavtsev2023-09-071-4/+4
| | | | | Change-Id: I28b3a8f48bf99cc87d2fdea9a370fce62a233959 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtGui: code tidies: use the 4-arg connect overloadGiuseppe D'Angelo2023-06-282-2/+2
| | | | | | | | The 3-arg connect is error-prone and makes the lifetime of the connection unclear. Change-Id: I99aa3575a7f901ac52f451f9ef51aa903640d097 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Div. private RAII/smart ptr classes: mark ctors [[nodiscard]]Marc Mutz2023-06-211-1/+1
| | | | | | | | | | | | | | | | The following private APIs are either RAII or smart pointer classes: - QAutoPointer - QBoolBlocker - QFdContainer QUIP-0019 says to mark RAII and smart pointer class ctors [[nodiscard]], so do that. Pick-to: 6.6 Task-number: QTBUG-104164 Change-Id: Ibc77e6603fadf18ea28428a49635f46a5680b777 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QXkbCommon: set Qt::KeypadModifier when keypad button is pressedMario Roessel2023-04-201-1/+1
| | | | | | | | Pick-to: 6.5 Task-number: QTBUG-111503 Done-With: Liang Qi <liang.qi@qt.io> Change-Id: Ic7ca48ea8709d38aa83c95a9b5a7d39ff82f08c7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* src: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-101-9/+4
| | | | | | Pick-to: 6.5 Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add eglfs touch logging in qt.qpa.input.eventsShawn Rutledge2022-12-161-0/+8
| | | | | | | | | We have this logging category on xcb and ios already. Task-number: QTBUG-103620 Pick-to: 6.5 Change-Id: I70153c4ea9d62316d0e05550559010d85e2f9d85 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-115-6/+6
| | | | | | | | | | | | | | | | 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, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-042-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = 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'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-151-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1635-1332/+72
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add missing header files to the module sourcesAlexey Edelev2022-05-121-0/+1
| | | | | | | | | All module header files should be listed in the corresponding sections of modules SOURCEs to be accessible in CMake routines. Task-number: QTBUG-103196 Change-Id: Ieb77ae70557e35e546a5b00387e1e0aa40338239 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtInputSupportPrivate: includemocsMarc Mutz2022-04-293-0/+6
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: I6eef540b66ba7e77ae0da9e8385368c15ffe8646 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Platformsupport: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-269-25/+43
| | | | | | | Task-number: QTBUG-98434 Change-Id: I4fa7ca58b4a298e81d35f19b439ed7702bd9700d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Platformsupport: stop using QLatin1Char() for creating char literalsSona Kurazyan2022-04-265-7/+7
| | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I58e00618fc8c82fad8d35a66c1d46e459bfc9de6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix unused variables in qtbaseAndrei Golubev2022-04-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | clang compiler recently got smarter and detects "pseudo used variable" patterns where we declare a variable and only use it in self-increments, self-decrements and other similar expressions Errors: qtbase/src/corelib/text/qlocale.cpp:3898:9: error: variable 'group_cnt' set but not used [-Werror,-Wunused-but-set-variable] int group_cnt = 0; // counts number of group chars ^ qtbase/src/corelib/text/qunicodetools.cpp:1372:21: error: variable 'uc' set but not used [-Werror,-Wunused-but-set-variable] const char16_t *uc = text + from; ^ and more of the kind Remove the ones that have no usage, mark others with [[maybe_unused]] Pick-to: 6.3 6.2 Change-Id: Ib2d0722110e3da8c39e29ec78c0ec290d064c970 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure all qtbase private headers include at least one otherThiago Macieira2022-02-2411-5/+15
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* evdev: Prevent race condition in touch events processingJungi Byun2022-01-261-1/+38
| | | | | | | | | | | | | | | | | Unlike other input devices, touch devices are managed by corresponding handler threads which are not the main thread. InputEvent that is inherited by TouchEvent has a constant pointer member for device, but in touch events case, handler threads may destroy the device which is pointed by events while processing these events in main thread, and this may cause critical potential issues such as crash. In order to prevent this race condition, move device of QEvdevTouchScreenHandler into main thread and delete this device later if QGuiApplication instance exists when handler thread quits, and check event's device is valid when processing touch events. Change-Id: I02583238d97d768abcc544ee882160eda3178282 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>