summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add QPointingDevice argument to every QWSI input event handler functionShawn Rutledge2020-06-186-105/+215
| | | | | | | | | | | | | | | | | | | | | | We want every QInputEvent to carry a valid device pointer. It may be some time until all QPA plugins are sending it, but it's necessary to provide the functions for them to start doing that. We now try to maintain the same order of arguments to all the functions. handleTouchEvent(window, timestamp, device, the rest) was already there (except "device" has changed type now), and is used in a lot of platform plugins; so it seems easiest to let that set the precedent, and modify the rest to match. We do that by adding new functions; we can deprecate the older functions after it becomes clear that the new ones work well. However the handleGestureEvent functions have only ever been used in the cocoa plugin, so it's easy to change their argument order right now. Modify tst_qwindow::tabletEvents() to test new tablet event API. Task-number: QTBUG-46412 Change-Id: I1828b61183cf51f3a08774936156c6a91cfc9a12 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Document QPromise APIAndrei Golubev2020-06-183-1/+238
| | | | | | | | | Documented QPromise. Added snippets under auto tests to ensure they are compiled and run in CI. Task-number: QTBUG-81586 Change-Id: I20084e38f9d2f6fc8540f95ee03ec3d2827177e8 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add support for QNotifiedProperty to the mocSimon Hausmann2020-06-183-14/+42
| | | | | | | | | | | Change the meaning of Q_PRIVATE_QPROPERTY to imply that the property is implemented using a QNotifiedProperty. That requires passing the owner object instance to the value and binding setters. Similarly, detect QNotifiedProperty members like QProperty. Change-Id: If49bbb04c8ccd4a661973888c50d2d556c25034f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix build without features.highdpiscalingTasuku Suzuki2020-06-182-0/+24
| | | | | | Change-Id: I9fee7303d53be228546accbcdf29a63b52e3f625 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix the vertical alignment of images in a text documentDominik Holland2020-06-181-3/+16
| | | | | | | | | | | Try to align with the HTML standard as much as possible. AlignBottom is now really the bottom of the line (not the text). AlignMiddle is between AlignTop and AlignBottom. Change-Id: Ia067b96209c2ab0becbff99cf15bb8ab193ee2c6 Fixes: QTBUG-84981 Pick-to: 5.15 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QString{Encoder|Decoder} documentationKarsten Heimrich2020-06-182-11/+13
| | | | | | Change-Id: I8e29846db77581953d90c818060950744cb9f521 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Android: Pass a null Bundle when calling QtActivityDelegate.onCreateAndy Shaw2020-06-181-2/+5
| | | | | | | | | | The onCreate function expects a Bundle variable to be passed in so it needs to get a null Bundle in this aspect to prevent it from crashing due to the lack of parameters. Change-Id: I8cc4b62d9e8db170b957f7574360033e91ca3493 Pick-to: 5.15 5.12 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: warn about too long build paths on WindowsAssam Boudjelthia2020-06-181-0/+29
| | | | | | | | | | | If Gradle build fails on Windows, check for java files that exceed the max length of 260 that Gradle can handle, then warn about the length issue. Pick-to: 5.15 Task-number: QTBUG-83875 Change-Id: Ia7462bc816b3efa4ba9fdd0f179fdc4c06e23248 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QOGLVAO::Binder: unexport a value classGiuseppe D'Angelo2020-06-181-1/+1
| | | | | Change-Id: Idd0261a30599d0eaeb6faffd0ff5615b5c45b670 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add a way to disable syntethesized bold and italic supportKyu Man Lim2020-06-182-4/+4
| | | | | | | | | | | | Using the environment variables QT_NO_SYNTHESIZED_BOLD and QT_NO_SYNTHESIZED_ITALIC it is now possible to disable the support for synthesized bold and italic, which is used when the font doesn't support those variants. Change-Id: Ic1a6984858e1260f252662689705553073859df4 Task-number: QTBUG-83124 Pick-to: 5.15 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove unused functionality from QTypeInfoLars Knoll2020-06-181-31/+1
| | | | | Change-Id: I10fe4cde7a18047599e656cc3bb67b0dfe18a986 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move UNIX services into QtGuiFriedemann Kleint2020-06-1835-83/+44
| | | | | | Task-number: QTBUG-83255 Change-Id: I95cd25c6e18ffb46955acc76d6cab551d1c8f5ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QtGui: Fix duplication of logging category lcQpaFontsFriedemann Kleint2020-06-186-8/+4
| | | | | | | | | Move it to qplatformfontdatabase.h. Amends 6be9830d865be32f224e15d13ddefd9c7e176553. Task-number: QTBUG-83255 Change-Id: I0a3807dc49128c8ddd1dfe7d725528c1a852950b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMetaMethod: implement returnType via returnMetaTypeFabian Kosmale2020-06-181-3/+1
| | | | | Change-Id: I6c77331c3bfe83b00e4bbdf960216df696aadabd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Only emit the signals once when doing multiple file selectionAndy Shaw2020-06-181-2/+2
| | | | | | Change-Id: Ie57908f5e882ef4f85f4199ecb06c09ae5d8ae2a Pick-to: 5.15 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Undef Q_DECL_ENUMERATOR_DEPRECATED when having no deprecation warningsAndy Shaw2020-06-181-0/+2
| | | | | | | | | | | Since Q_DECL_ENUMERATOR_DEPRECATED can be explicitly set to something other than QT_DEPRECATED, then it needs to be explicitly undefined when QT_NO_DEPRECATED_WARNINGS is used to prevent it from showing a warning. Pick-to: 5.15 Change-Id: Ibe73ff5e7b5aa5eff93d0c4c0a38a33855a9a330 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNAM: Fix my silly leftover mistakeMårten Nordheim2020-06-181-1/+0
| | | | | | | | | | | I removed the line locally, and then added it back for testing and forgot to remove it again. Amends a0bfa4e1f8e223927cbb285bb17d1a00a5c2d4b6. Task-number: QTBUG-84907 Change-Id: I7d6d0237742f4c3fc3ca0a2532d776325f396aab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CMake: Use intelcet flags for bootstrap and qmakeAlexandru Croitor2020-06-181-0/+1
| | | | | | | | | This should fix build failures on Ubuntu 20.04. Amends fa98adbd04de9d44ce921436b92589a41f285dcd Change-Id: Iff399faff0cf06f5b88d756b1f632b8798069578 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove some dead codeLars Knoll2020-06-172-51/+3
| | | | | Change-Id: I4e3906d5e6313014b207aa7bc63a0ff5e21b0261 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Cleanup float-equal warningsLars Knoll2020-06-1711-32/+16
| | | | | | | | Consistently use the macro from qcompilerdetection.h instead of manually disabling the warning for three different compilers. Change-Id: Id59d30047c8a504e1082d7e47c02f4746fddf9d6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Disable float-equal warnings in QGenericMatrixLars Knoll2020-06-171-6/+6
| | | | | | | | | Those warnings can cause compile errors if someone instantiates the equality operator. Pick-to: 5.15 Change-Id: I95fab87a424b2d359a8f3e22134f9d3ff6219703 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use dedicated function for chopping QByteArrayRobert Loehning2020-06-171-2/+1
| | | | | Change-Id: I03f5e782a3d5d63540db9a5fdd1d432e71b5eec5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtGui: Update CMakeLists.txt after adding QInputDeviceFriedemann Kleint2020-06-172-3/+4
| | | | | | | | | Run pro2cmake.py again, amending 6589f2ed0cf78c9b8a5bdffcdc458dc40a974c60. Change-Id: I27178f412bcf9d3731fbd06b4099ca4faec07a5c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QMath: make the math-related functions templatesGiuseppe D'Angelo2020-06-172-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we can take and return more datatypes than qreal, just piggy-backing on the std:: functions (which take any integral and any fp datatype). This makes these functions pure ADL enablers (like qSwap). A type (hi, QAngle!) that wants to have math related functions simply needs those defined in its own namespace using the "standard" names (sin, cos, etc.); and we'll find them using the q-prefixed function. qCeil and qFloor signatures however still return int to avoid too much breakage. The FP-related functions (qIsInf, etc.) have been left alone. Those are "special"; a lot of care is in qnumeric because some implementations define them as macros, which blocks any possibility of user-defined overloads found via ADL. [ChangeLog][QtCore][QtMath] The math-related functions (such as qSin, qCos, qPow and so on) can now take an arbitrary parameter rather than just qreal. They will do a ADL-enabled call to the respective free function, using the functions in namespace std as a fallback. Moreover, they will now return whatever datatype is returned by the free function (e.g. long double if the call is placed on a long double). Change-Id: I111084eda52556663802e65a85e082187c2a6861 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make QInputDevice::devices() return a QListShawn Rutledge2020-06-173-7/+7
| | | | | | | | | | | There was a decision to use QList consistently in public API, now that it's supposed to perform as well as QVector. Amends 6589f2ed0cf78c9b8a5bdffcdc458dc40a974c60 Task-number: QTBUG-46412 Task-number: QTBUG-72167 Change-Id: I30004792667ee0581a433409ac2e20ffc645e952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-1659-1071/+1872
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Always show a submenu on its parent menu's screenShawn Rutledge2020-06-161-1/+1
| | | | | | | | | | | | | | | QWidget::screen() was added in b455a863a1df61337f36f2e8b43101ca21514697 and this is another good use for it (in 5.15 and newer). Amends c068edcecf6876c7b57abbe302ad8b1347e4445e Pick-to: 5.15 Fixes: QTCREATORBUG-24195 Task-number: QTBUG-76162 Change-Id: Ifaafe9b45fafaae220da54bbf3bc7a568e7953f9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Write object libs of Qt resources to .prl filesJoerg Bornemann2020-06-161-0/+1
| | | | | | | | | | | | | | | Since commit e343affd634 we're creating object libraries for Qt resources in static libraries. Those must be reflected in the generated .prl files for static builds of Qt. In qt_add_resource, we now calculate the install locations of the object files of rcc-generated C++ files and save them in the target property QT_RCC_OBJECTS. This property is then passed to QtFinishPrlFile to write the object file paths to the .prl file. Change-Id: Ic383892d723d02fc91f712bc2dbcbc90babad074 Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Document that Q_INIT_RESOURCE is not necessary for CMake-based projectsJoerg Bornemann2020-06-161-2/+6
| | | | | | | | | | | | | | | | | | Since commit e343affd634 we're creating object libraries for Qt resources in static libraries when building Qt or a Qt-based project with CMake. The purpose of this is to remove the need for calling Q_INIT_RESOURCE in static libraries. Add a note to the documentation and a changelog entry. [ChangeLog][CMake] Calling Q_INIT_RESOURCE in static libraries is not strictly necessary anymore for CMake-based projects. There, for each resource, an object library is created which is linked into consuming projects. This ensures that the linker does not discard the resource's object file, and its initializer is called automatically. Change-Id: I70de439f964dc7257a2255683eda4d434fa451d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix build with -no-opengl on WindowsPaul Olav Tvete2020-06-161-0/+2
| | | | | | Change-Id: Ib29012361a2b7f2f0b0da53a7736bb3f3384ae38 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QSslSocket: delete deprecated cipher settings APITimur Pocheptsov2020-06-162-156/+0
| | | | | Change-Id: I439ea567b9a4add3eb205335420810d88b580b20 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use qsizetype instead of int in QByteArray's helper methodsSona Kurazyan2020-06-162-33/+34
| | | | | | | | | This is needed as a preperation for introducing QByteArrayView, which will use qsizetype instead of int for size. Since these methods will be reused by QByteArrayView, they need to use qsizetype. Change-Id: Ia2d94ec70742d4f9326de9548fd7534d56d3a5ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Warn about constructing QMetaTypes/QVariants with invalid type idsLars Knoll2020-06-162-3/+2
| | | | | | | | | | | Warn about using an invalid type id in all cases. So far, only some constructors of QVariant would warn. Move the warning over to the place where we map a typeid to a QMetaTypeInterface to catch all cases. Change-Id: I4cd48a2b5d6c597dbf2afbeae9b811cd0819b768 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make the default constructor of QMetaType constexprLars Knoll2020-06-162-5/+2
| | | | | | | And inline the copy constructor forwarding to another one. Change-Id: I3c4f76f7b14edd84f512ef0687416b20940e333a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Android: Add support for proxiesAndy Shaw2020-06-169-3/+283
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-78812 Change-Id: Id1f35a5e4ca3d8841edae378df69b65ef599c1ca Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make sure we correctly construct underlying base platform themeJan Grulich2020-06-161-1/+1
| | | | | | | | | | When the base platform theme is not set to a null pointer, then we might assume it has been already constructed and later on try to access an invalid address which will cause a crash. Pick-to: 5.15 Change-Id: I6187336bca527e1feeb0902bcfb16f2fbec86d24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows font databases: Enable DirectWrite for cmakeFriedemann Kleint2020-06-1514-117/+1339
| | | | | | | | | | | | | | | | - Remove the DirectWrite1,2 features. Windows 10 should have them, only MinGW is missing directwrite3. The feature directwrite now implies DirectWrite2. - Remove the custom defines. - Port over the configure tests from configure.json and add missing ones for DirectWrite(2), DirectWrite3 and Direct2D and Direct2D 1.1, fix the conditions and report them in the summary. Task-number: QTBUG-83255 Fixes: QTBUG-83931 Change-Id: I1fc68997adc715bd5c6d7ec457f58c46e1f81c6a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QFontDatabase: Guard against Null-dereference READRobert Loehning2020-06-151-1/+1
| | | | | | | Fixes: oss-fuzz-23112 Pick-to: 5.15 Change-Id: I06818d8642067cd510a513838e7851eb8b322aef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port platform plugins to QStringViewLars Knoll2020-06-1510-11/+17
| | | | | | Task-number: QTBUG-84319 Change-Id: If409ba1c99f30c7ab32c7cc826c7f303ccf18c1d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Relax tst_qvulkan::vulkanVersionRequest to make it compatible with 1.1Laszlo Agocs2020-06-151-0/+7
| | | | | | | | | | | | | | The Vulkan spec changed the behavior for VkApplicationInfo::apiVersion in 1.1, conveniently breaking compatibility with all existing 1.0 logic. We can no longer assume that the 1.0 behavior, which was failing instance creation with VK_ERROR_INCOMPATIBLE_DRIVER for an unsupported version, is always in place. So do not rely on this in the test, and add a reminder in QVulkanInstance docs as well. Fixes: QTBUG-85040 Change-Id: I8f5c7a7830877b72d106c444aebfaea191083ee0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Add a feature flag for readback format supportLaszlo Agocs2020-06-156-1/+23
| | | | | | | | | Indicate that doing a QRhiResourceUpdateBatch::readBackTexture() for texture formats other than RGBA/BGRA is not necessarily supported at run time. Change-Id: Ie9ca9546a3af9bff142b875f1ecf26bf26bcc442 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QNAM: Remove network connectivity pre-checkMårten Nordheim2020-06-155-76/+0
| | | | | | | | | | | | | | | | | | | The connectivity pre-check has been around for a long time, and it has caused various issues in that time. Certain scenarios, like using certain VPN configurations, might confuse the OS into thinking you don't have and network connectivity at all and abort the connection. Especially noticeable/frustrating when the connection was going to a host inside the local network. The negative impact of this change would at worst be that we might try to connect and it will wait some amount of time before the OS tells us the connection failed in situations where it would previously have been aborted before it started. But the false-negatives are not really an OK sacrifice in that case. Fixes: QTBUG-84907 Change-Id: I37fc69051e39df3c1a1fecb56ef54521a4d3d0c3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move Unix font databases into QtGuiFriedemann Kleint2020-06-1558-198/+81
| | | | | | Task-number: QTBUG-83255 Change-Id: Id85a1e0f3de371951783fe97485158c4a02e1f15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: fix qmlimportscanner not correctly assignedAssam Boudjelthia2020-06-151-1/+1
| | | | | Change-Id: I6c1212085211e060dda0a84a8660b653bcd30817 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* a11y: Implement accessibilityHelp on macOSJan Arve Sæther2020-06-151-0/+10
| | | | | | | | | Note for manual testing: You can read it manually with vo+shift+h Fixes: QTBUG-84864 Pick-to: 5.15 Change-Id: I5686e40642396db2fde685cf07b758acd29c6ee0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Port dbus from QStringRef to QStringViewLars Knoll2020-06-157-36/+35
| | | | | | Task-number: QTBUG-84319 Change-Id: Ifdfad6b7ac8b61ead71382e5ae3cb22b50b2504c Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Port androiddeployqt and uic from QStringRef to QStringViewLars Knoll2020-06-155-13/+14
| | | | | | Task-number: QTBUG-84319 Change-Id: I7f30a4d73dd98ee1977645d7274816cd71307506 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port platformsupport to QStringViewLars Knoll2020-06-159-15/+15
| | | | | | Task-number: QTBUG-84319 Change-Id: I8032382904bc8481fe0a147ca38f3de9cfb1890f Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Suppress warning of unused function on macOSThiago Macieira2020-06-121-0/+3
| | | | | | | | | | This function is only used on FreeBSD and Linux. forkfd.c:243:12: warning: unused function 'convertForkfdWaitFlagsToWaitFlags' [-Wunused-function] Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160bf81f01960f2f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix usage of gc_binaries featureAlexandru Croitor2020-06-122-2/+2
| | | | | | | | | | | | | | | | The qt_internal_apply_gc_binaries function should apply both compile and link flags, not just link flags. The flags should be applied publically to all consumers of Bootstrap regardless if the gc_binaries feature is enabled. The flags should be applied publically to Core only in case if the feature is enabled (aka for static builds only). Change-Id: Id42af0d9b527004d74c04eff2c9e3c2be1e76aac Fixes: QTBUG-84461 Task-number: QTBUG-83929 Reviewed-by: Cristian Adam <cristian.adam@qt.io>