summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | 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>
* Platformsupport: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-261-1/+3
| | | | | | | 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-261-2/+2
| | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I58e00618fc8c82fad8d35a66c1d46e459bfc9de6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add evdev support for FreeBSDOleksandr Tymoshenko2016-10-061-0/+4
| | | | | | | | FreeBSD 12 has evdev implementation dropin-compatible with Linux's /dev/input. Add #ifdef wrappers around platform-specific headers. Change-Id: Ia50c3f2d2e9f0f3689a92e327305d5e7547e9407 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use QString::fromLatin1() less to avoid string allocationsAnton Kudryavtsev2016-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | QString::fromLatin1 always allocates memory, but there are cases where we can avoid/reduce allocations or/and reduce text size, e.g.: QStringBuilder expressions Fix: replace QString::fromLatin1 with QL1S QString::fromLatin1().arg(String) pattern Fix: replace with QStringBuilder Overloaded functions with QL1S arg Fix: replace QString::fromLatin1 with QL1S In rare cases if there is no overloaded function with QL1S and we have deal with string literal, replace QString::fromLatin1 with QStringLiteral. Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* platformsupport: eradicate some easy Q_FOREACH loopsMarc Mutz2016-08-261-2/+4
| | | | | | | | | | | | All loops trivially not modifying the iterated-over container. Saves ~9.4KiB in text size across all plugins and libs (statically) linking in QtPlatformSupport (optimized GCC 6.1 Linux AMD 64 build). Change-Id: I2d91da1f78d9b33d4c5e4a1627560d8e705a9b9a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix resource leak/fix broken file open checkFrank Meerkoetter2015-12-221-2/+4
| | | | | | | | | | | Also marking the error path as unlikely while I am on it. Fixes coverity CID154482. Change-Id: I069fa7753e364ff1b8a4449b7008dfa8aee73de5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* QDeviceDiscovery: Add static discovery support for new-style multitouch devices.Robin Burchell2015-10-271-44/+54
| | | | | | | | | | | | | | These don't report ABS_X/ABS_Y, but are still a touchscreen. This is commonly seen on Android hardware. As a bonus, we clean up the flow control through device discovery: by using memset, we can ignore the error value of ioctl() and just check the bits we need. We can also close() the FD instantly after running the ioctl calls. Change-Id: I6405597dc34841c805552fa73ef86250eaae111c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-2/+2
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add joystick/gamepad recognition to device discoveryLaszlo Agocs2015-03-091-31/+22
| | | | | | | And to keep things readable, migrate to categorized logging. Change-Id: Ie9d82bb4e93d3b96f1a7bf54a37cfde4a941bc7d Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Reorganize devicediscovery headerLaszlo Agocs2014-11-261-11/+6
| | | | | | | | | | | | | | | | As pointed out in 13b939c7f41bceb2061e549923eab242326e9bb5 the approach qdevicediscovery_p.h takes is just wrong. The defines it relies on will often be missing when the header is included from random places in qtbase. This results in different class layouts. It was working only because the interface of the class is very limited and the public part was matching regardless of having the macro defined. This is now corrected by introducing subclasses and a common, non-variated base class. QDEVICEDISCOVERY_UDEV is removed completely. Change-Id: I9c83b5b041440a3a6ea3a604eee4a325d4d74439 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Checking input mask before scanning evdev devicesCedric Chedaleux2014-02-051-12/+16
| | | | | | | | Adding device mask verification for static device discovery. DRM devices are no longer scanned if mask is set to input devices only Change-Id: Ibd2e77280c2d93c707ba7bdb84c4ae3cb0932178 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* android: work around android's linux/input.h being retarded.Robin Burchell2012-07-061-0/+14
| | | | | | | | It seemingly doesn't include many of the required defines for evdev, so do what everyone else seems to do, and work around it. Change-Id: I4a6ffb548c7370f675c736177b63220f034d06b8 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* evdevtablet pluginLaszlo Agocs2012-06-041-0/+5
| | | | | | Change-Id: Ie8fbaac929180e6d4c626253c4c20d1b3a9083f5 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix int-long mismatch in device discoveryLaszlo Agocs2012-05-311-1/+1
| | | | | Change-Id: I506fc206e68d57b67524cedf99896db1cff1694f Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* devicediscovery: add more sophisticated discoveryJohannes Zellner2012-05-261-11/+75
| | | | | | | | | | Detect devices based on bit testing through evdev ioctl api. As this is for the udev replacement, the bit testing is done similar to what udev does. The current keyboard detection is based on testing if the KEY_Q is available. This might be adjusted in the future. Change-Id: I3f4176681a351e33d90a1425f1afedc8ce3640b8 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* udev: UDevHelper becomes DeviceDiscoveryJohannes Zellner2012-05-241-0/+114
Rename QUDeviceHelper to QDeviceDiscovery and add a static device discovery fallback in case we dont have udev. The fallback so far only scans /dev/input/event* and /dev/dri/card* at startup and detects device nodes only by device path. Change-Id: I7a423910b30ae16a10d8f1f47b86c6b4d2c2ec36 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Donald Carr <donald.carr@nokia.com>