summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
Commit message (Collapse)AuthorAgeFilesLines
* evdevtouch: Fix touch device count not being updatedJohan Klokkhammer Helsing2019-10-111-1/+1
| | | | | | | | | When this was refactored in 3bc10fb9bb9 to use unique pointers, a move was added before the connection, so it would essentially always try to connect a nullptr. Change-Id: Iab7fce88bc73afd78e6b63ffaef7358f3f4ce7e3 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* Add qt.qpa.input.events logging to evdevtouchShawn Rutledge2019-10-101-0/+7
| | | | | | | | | | The xcb platform plugin uses this category for detailed input event logging, so we might as well be consistent in evdevtouch. When hardware supports pressure sensing, it's likely to need extra debugging. Task-number: QTBUG-77142 Change-Id: I7682bb5d49e669054523f9cf556715e511bcd572 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* evdevtouch: Report stationary touchpoints that include pressure changesShawn Rutledge2019-10-081-1/+5
| | | | | | Task-number: QTBUG-77142 Change-Id: I35446092679573df51891302155c896a3bb6fc1c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CoreText: Warn the user when family alias lookup slows down the applicationTor Arne Vestbø2019-10-082-6/+46
| | | | | | | | | | | If the user specifies a font family in their application that doesn't exist in the system, or one that uses the localized family name, we will end up resolving the family alias for all fonts in the system, which typically adds 600-800ms of startup time. Let the user know when this happens. Change-Id: Id8d6f55028e37f681ec4a686df25d33240b5a30f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* CoreText: Use categorized loggingTor Arne Vestbø2019-10-041-4/+4
| | | | | | Change-Id: I4cfa6b0ef15adb7e600d66f4fe5b3dc17470f1c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-041-5/+3
| | | | | | | | Increases readability Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tslib plugin: remove debug print on old tslib versionsv5.14.0-beta1Rolf Eike Beer2019-10-011-0/+2
| | | | | | | | | | | | This introduces a dependency on ts_get_eventpath(), which is only available in tslib 1.15 and newer. This raises the required version to an unneeded level, so just drop the debug message if the API is not available. Change-Id: I4a1cd7abec8d139e70555506d9d21edacf0f4d71 Fixes: QTBUG-78867 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-301-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| * iOS: Fix fallback fonts on iOS 13+Eskil Abrahamsen Blomfeldt2019-09-261-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since iOS 13, the cascade list for the default UI font contains meta-families for several writing systems, such as CJK. Since these font families were never populated to the database, we ignored them in Qt, and thus got missing glyphs for the characters in question. The fix is to make sure these fonts are populated in the database. It contains a partial backport of 922d195020d54d7e599d135f6a5e0338100e08f1, which adds the qt_isFamilyPopulated() accessor to allow us to check if the family has been populated in the font database. In Qt 5.14, there is public API for this in QPlatformFontDatabase, so this is a temporary resolution until then. Fixes: QTBUG-77467 Change-Id: Ia9ebb8a19ad2367eb764ae1496a52966b465336b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Handle returned bitmap glyph when not requestedAllan Sandfeld Jensen2019-09-251-7/+23
| | | | | | | | | | | | | | | | | | | | Add back code to handle bitmap glyphs returned when we did not request a bitmap glyph. This is a can happen on some configurations where bitmaps are not suppressed. Fixes: QTBUG-78116 Change-Id: Ie0c6cfbf9c50456431b0e3a23e568f3399e5a879 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Joerg Bornemann2019-09-201-2/+5
|\| | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/makefile.h Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
| * evdevtouch: Add fallback definition of ABS_MT_PRESSURE; fix alignmentShawn Rutledge2019-09-171-2/+5
| | | | | | | | | | | | Fixes: QTBUG-78298 Change-Id: Ib6acb1fdca551a84aba5dec2f28cf784a212692c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | CoreText: Modernize style hint fallback lookupTor Arne Vestbø2019-09-162-129/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DefaultFontFallbacks.plist system file that we used for looking up style fallbacks does not exists in macOS 10.15, nor did it ever exists on iOS. Instead of relying on this file, we hard-code a set of default families, that we then look up the fallbacks for. The result of QFont::defaultFamily() on macOS is now: QFont::Helvetica --> "Helvetica" QFont::Times --> "Times New Roman" QFont::Courier --> "American Typewriter" QFont::OldEnglish --> "" QFont::System --> "Lucida Grande" QFont::AnyStyle --> "Lucida Grande" QFont::Cursive --> "Apple Chancery" QFont::Monospace --> "Menlo" QFont::Fantasy --> "Zapfino" And on iOS: QFont::Helvetica --> "Helvetica" QFont::Times --> "Times New Roman" QFont::Courier --> "American Typewriter" QFont::OldEnglish --> "" QFont::System --> "Helvetica" QFont::AnyStyle --> "Helvetica" QFont::Cursive --> "" QFont::Monospace --> "Menlo" QFont::Fantasy --> "Zapfino" Fixes: QTBUG-78240 Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-1/+1
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-1/+1
| |\ | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | * Deliver stationary touchpoints that have changed pressureShawn Rutledge2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a rule, we don't deliver touch events containing only stationary touchpoints. To fix QTBUG-52510 we added an exception in 1bd0ab7050304d9e8989cde77e486947c56b9696 : if the velocity changed, deliver it anyway. Now we need to do the same if the pressure changed. Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE. Change-Id: If7f7088df055d686cdd86967b999e38024f8170f Fixes: QTBUG-77142 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-042-2/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| * | Merge remote-tracking branch 'qt/5.12' into 5.13Paul Olav Tvete2019-08-202-2/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/configure.json src/gui/util/qtexturefilereader.cpp src/gui/util/util.pri tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
| | * eglfs/kms: Re-enable drm/gbm format overrides in the config fileLaszlo Agocs2019-08-152-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to 091a386eaf91ad8932332a8aefc2df793de59f6c Defaulting to querying from the egl config is fine, but dropping support for the "format" key in the output list in the json config file is not ideal. Task-number: QTBUG-76748 Change-Id: I25dc99369d118c300cdef25b464426f6be85453b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | eglfs/kms: Add drm atomic blend_op property handlingPaul Olav Tvete2019-08-222-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for specifying the blend operation used when alpha- blending KMS planes. Only available with atomic modesetting. Set the environment variable QT_QPA_EGLFS_KMS_BLEND_OP to the enum value of the 'blend_op' property. Task-number: QTBUG-75659 Change-Id: If0ef5ba314b88adb530113b608d20fc9c027c5ec Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-161-1/+3
|\| | | | | | | | | | | Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-151-1/+3
| |\| | | | | | | | | | Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
| | * glx: Do not flood with warnings when reducing during config lookupLaszlo Agocs2019-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With things like sample count reducing a format (16 -> 8 -> 4 -> ...) and trying again is perfectly fine. There is no need to show warnings in this case. Even some of our own examples in qtdeclarative do a setSamples(16) which is rarely supported. These all show warnings since 8ec98fc2dc40237730f99af099dffe2920ef5bcc. Avoid this. Change-Id: Ice83d5720b02e92f77cfd63918c98ad222513b6a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | eglfs: Drop annoying warnings without drm atomicLaszlo Agocs2019-08-131-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | No point in warning on every application startup that framebuffer size setting is not available. Just ignore it then. Change-Id: Id36ff0ab9560b99cc3f2d56a4ee51455cfa43cb7 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-132-53/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/corelib/tools/qlist.h src/gui/painting/qcompositionfunctions.cpp src/gui/painting/qtriangulator_p.h src/gui/text/qfontengine_p.h src/network/kernel/qhostinfo_p.h src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-122-53/+8
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/write_info.pri Repair architecture config test for the WASM_OBJECT_FILES=1 build mode configure.pri tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
| | * Refactor lockedAlphaMapForGlyphLars Knoll2019-08-082-53/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simply return a Glyph pointer and not a QImage to avoid allocating and deleting lots of d pointers for QImage when drawing text. Saves one new/delete pair per glyph drawn and speeds up text drawing by 10% for relatively large glyphs (probably more for smaller ones). The qtext::paintLayoutToPixmap() benchmark shows a 16% improvement in performance with this change. Renamed the method to glyphData(). Change-Id: I7a353de521e4f4321c770fb1ac6043d33f6f332c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Port users of QDBusAbstractInterface::(async)callWithArgumentList() to new ↵Marc Mutz2019-08-072-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variadic (async)Call() Except in the auto-generated files. Required to add a cast operator from QDBusObjectPath to QVariant, as the variadic call() uses QVariant(arg) instead of QVariant::fromValue(arg). [ChangeLog][QtDBus][QDBusObjectPath] Added explicit cast operator to QVariant. Change-Id: I3f3004f7b9300a6340d27488f5b97981cbab3c24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Revert "Fontconfig font database: Short-circuit matching by filename"Eskil Abrahamsen Blomfeldt2019-07-301-50/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eea99e1e8f3eb67fda35dd3a656fe9b5a9be84f2. The call to FcFreeTypeQuery() takes over 300 ms for NotoSansCJK-Regular.ttc and friends, so in the current state, this change cannot be used. I am not sure why these file in particular takes so long, but it might be because it is large (around 19MB) or because it is a font collection. The original fix was intended to be a smaller performance optimization, but it has added over 2 seconds startup time to simple applications showing Chinese text, so we revert it for now and it can be resubmitted later when the problems have been ironed out. Task-number: QTBUG-77108 Change-Id: Ibb2ef799573d7effd1595d788939fe33d82cc923 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | kms: Try to preserve existing output routing as weston would doYuya Nishihara2019-07-291-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is basically a backport from weston: https://github.com/wayland-project/weston/commit/75487c2560dfca033d8d23649914efb4199356dd It states that: - preserving the existing CRTC -> encoder -> connector routing will make the startup faster - the existing routing may be set according to some device limitations Since the QtWayland implementation appears to be based off an old version of weston (maybe pre-2.0), this patch might look different from the latest weston implementation. But the idea stays the same. FWIW, this works around the issue I've seen on Renesas R-Car E3 (aka Ebisu) board. Without this patch, VGA1+HDMI1 setup would fail because the device reported possible_crtcs=1 (meaning {crtcs[0]}) for the second screen "HDMI1", but the crtcs[0] was already taken by the first screen "VGA1". No usable crtc/encoder pair for connector "HDMI1" With this patch, the crtcs[1] is paired with "VGA1" (as it is the existing routing), so the crtcs[0] can be allocated for "HDMI1". Change-Id: Ibd304a8b5efbe4a8aa94b2c5697fe2b399386280 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Revert "eglfs: Add vsync support when using NVIDIA eglstreams"Dominik Holland2019-07-261-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df2b76046de4af7a47fa8303d5f261e3c5d120fe. The patches causes high cpu load and it looks like vsync is done by newer NVIDIA drivers out of the box without such a implementation. Change-Id: I41c9cfcf1bbdf7da9b764394e4442768084e9a35 Fixes: QTBUG-74866 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-178-23/+47
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-128-23/+47
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.pri Also required s/solid\.color/solidColor/ in a couple of places in: src/gui/painting/qpaintengine_raster.cpp Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
| | * Fix compilation with C++20Marc Mutz2019-07-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit capture of 'this' in [=] is deprecated in C++20. Fix by using explicit captures. Change-Id: I1633446f4670202b0d1aca938d8c27dbc0c1411e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * Support pen color with color fontsEskil Abrahamsen Blomfeldt2019-07-056-21/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Color fonts may also contain regular alphabet characters that should be rendered with the current pen. In Qt, however, these characters were drawn into the cache with a default pen color of black. Since all characters in a font is currently backed by the same cache, and it would require a lot of plumbing to get around this, a step in the right direction is to include the current pen color in the cache as long as it is an RGB cache. This means that drawing text with the color font with different pen colors will create different caches. There is no API to select font color on Freetype currently, but this problem has also not been observed there, as the fonts in question, with both regular and color glyphs, are not being detected as color fonts (so the text color will be correct). So Freetype will be left out for now. [ChangeLog][QtGui][Text] Fixed bug where regular text rendered with a color font would always display in black. Task-number: QTBUG-55096 Task-number: QTBUG-74761 Change-Id: Icc7dbf73241db1e7cc6a0de18c2de927aeecf713 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-283-0/+284
| |\| | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | * Add a QVkConvenience class with vkFormatFromGlFormatJohan Klokkhammer Helsing2019-06-213-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converts from OpenGL formats to Vulkan formats. There are commented out lines for the formats in QOpenGLTexture::TextureFormat for which it was hard to find an unambiguous mapping to vkFormat. Task-number: QTBUG-75108 Change-Id: I06a7fd8df7d98cef314410ffd79ca9cff6599357 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit b21b07877a96c175ee51e83e1b41425c2e67beb3) Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-201-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/network/ssl/qsslsocket_openssl.cpp src/widgets/styles/qstylesheetstyle.cpp Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
* | | Be less laissez-faire with implicit conversions to QCharMarc Mutz2019-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QChar currently is convertible from nearly every integral type. This is bad code hygiene and should be fixed come Qt 6. The present patch is the result of compile fixes from marking these constructors explicit. As is clear from the distribution of fixes, only low-level string handling code used these implicit conversions, an indication that they're not in widespread use elsewhere. Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Fontconfig font database: Short-circuit matching by filenameAndreas Hartmetz2019-07-061-22/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the filename matches, no other matching is necessary. Fontconfig doesn't have a fast path for that, so implement one here. Fontconfig is unlikely to add that fast path, see here: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/103 With -O1 builds of Qt and KDE stack, 358 fonts installed according to KDE systemsetting, on a Ryzen 1800X, startup time of kwrite decreases as following according to perf stat: msec task-clock: ~480 ms to ~455 ms cycles: ~1.73e9 to ~1.65e9 Change-Id: I630a80e4bed2647d5bbd95247005aab7d0cb0363 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Port some trivial cases from QMutex to QRecursiveMutexMarc Mutz2019-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | In all of these cases, the effect of the change is local to one file. Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Optimize some atomic countersMarc Mutz2019-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the static QAtomic at file scope to avoid GCC's pessimisation with function-static QAtomic (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561), and make sure the initial value is 0, so it ends up in BSS, not TEXT. In QRhi..., don't create a static instance of the wrapper class, use a file- static atomic, too. This turns the class into a glorified namespace. Change-Id: I707f628e2b434330028077223071716d5704ba32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-251-0/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | Add accessibility notification roleFrederik Gladhorn2019-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Linux this role is needed to make desktop notifications work. There is no equivalent for Windows, iOS or macOS. On these platforms the role will have no effect. Fixes: QTBUG-76333 Change-Id: I4ef3b3321f7a0e2c09c1ce432a668428d14c52b7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-202-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QEvdev: remove m_deviceDiscovery membersMarc Mutz2019-06-138-24/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They were never referenced outside the classes' ctor and, worse, remained uninitialized if the specification string contained devices. Change-Id: I977a156acf10190428da00fe128fee70cff8f98d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QEvdev: Extract Method parseSpecification()Marc Mutz2019-06-137-56/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All four manager classes contained roughly the same code in their ctors that parsed out devices from a colon-separated string. Extract shared code, and port the parsing to QStringRef (later to be ported to QStringView). Saves ~2.4KiB on optimized Linux GCC 9.1 AMD64 builds across all .so's that link to libQtInputSupport.a. Change-Id: I3db826ee2b422cfc02f8d49bd21985a03b6c0935 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QEvdev: Replace manual memory management with unique_ptrMarc Mutz2019-06-1214-58/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make create() return, and m_mice/m_keyboards/etc store, handlers by unique_ptr. In most cases, we can't use qt_make_unique(), since the ctor we're calling is marked as private. Since QHash can't hold move-only types, use a std::vector<{QString, unique_ptr}> instead. As this pattern repeats in all four QEvdev*Manager classes, create a small class template. Saves almost 6KiB on optimized Linux AMD64 GCC 9.1 builds across all .so's that link to QtInputSupport.a. Change-Id: I8f62b6b629d6e1855314c0a4fb4fc069db9ae0ce Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | AtSpiAdaptor: eradicate remaining Q_FOREACH loopsMarc Mutz2019-06-131-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and replace them by C++11 range-for loops. Change-Id: I6975121f606ec1fcda7a624b02a68edf829bb70b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | QEvdev: Extract Method updateDeviceCount()Marc Mutz2019-06-116-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is noisy and repeats, so wrap it in a function. Change-Id: I5e6e924e22b0bc631eb8176de96c49066b1c9029 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>