summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QVariant benchmark: fix crashesFabian Kosmale2021-01-271-4/+7
| | | | | | | | | | | - Skip unused metatype id - Do not construct a QVariant from an int, when we instead want to construct a QVariant for a given metatype (was: metatype id in Qt 5) Change-Id: I1ac19dec5549b424a9429f69999eaf8e96c022e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 6d3a886f09955fec29e541baa786633cce2b2b9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Protect against sign-change of size on 32bitAllan Sandfeld Jensen2021-01-271-1/+1
| | | | | | | | | | | | | Since qsizetype is signed and the profileSize unsigned, it can turn negative circumventing the test here. Fixes oss-fuzz issue 29278. Change-Id: I1e211c78db6f4ff150613f52d8fc29807f0088ff Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 05741b404ad5a8f9a490191a347e67c61456a89c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix output files of the *_header_check targetsJoerg Bornemann2021-01-271-1/+3
| | | | | | | | | | | | | | | | Header files of a Qt module are usually found in subdirectories. Avoid creating object file paths like "header_foo/bar.h.o". When building with conan, the "header_foo" subdirectory was not created for whatever reason. Now, we make sure we have clean object file paths, e.g. "header_check/foo/bar.h.o", and we create the directory upfront before invoking the compiler. Pick-to: dev Fixes: QTBUG-90529 Change-Id: Ifa5d6b97e07fc4e249c58cda5128439d60b14f5f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QJsonObject::take: add missing detach() callThiago Macieira2021-01-272-0/+20
| | | | | | | | | | | We were modifying shared objects. Fixes: QTBUG-89625 Change-Id: Id6bc735b79cf4beb9454fffd165c56476a5dec04 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 00b759a8d06dbec42232b1b8748c0725da7ced00) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix that the placeholdertext of QCombobox is not drawnChunLin Wang2021-01-271-2/+4
| | | | | | | | | | If the current index is invalid,a placeholdertext will be displayed. Fixes: QTBUG-90595 Change-Id: Id4c6b9c959242b96ee0944b8fc3131a9a2fdcccc Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 6da6b6da4494439dc34e92fee7d69b5ad48a783d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* evdevtouch: Fix normalizedPositionValery Volgutov2021-01-271-0/+6
| | | | | | | | | | Set the available virtual screen geometry. This geometry is needed for QEventPoint::normalizedPosition calculation. Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> (cherry picked from commit f7f618b3125289ab6ad68fe6c4ccf9864c41b02f)
* Make QCalendar's backend registration reentrant-safeEdward Welbourne2021-01-261-32/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, different threads instantiating the same back-end could collide in the register, with various unwelcome results. Give Registry an atomic status flag to track whether it has been populated or is being destroyed; and protect it with a mutex to ensure distinct threads do not collide during registration or attempt to register while the registry is being destroyed. Document the correct way to instantiate custom backends, and that no code other than the QCalendar implementation should instantiate the built-in ones. Instantiators that follow these rules should be safe from failed registrations, provided they don't pick a name that conflicts with some other backend. They can also use the recent change to semantics of registerAlias() to verify that registration *has* succeeded. Done-with: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Task-number: QTBUG-88815 Task-number: QTBUG-85692 Fixes: QTBUG-84575 Change-Id: Ie78e700e71d610454152c05cafb38f6f713649ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0180a1ab8229c6a15d19317bf7680663ac402910) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Github Actions: many minor updatesDimitrios Apostolou2021-01-261-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | + Add Ubuntu-20.04 Github Actions runner + Use as many system libraries as possible on all platforms except Windows + Checkout the git repository into a directory named "source", so that it's possible to checkout more repositories in the future + Configure with install prefix set to a temporary path, it will be used for uploading binary artifacts in the future + Configure with -pkg-config instead of -feature-pkg-config; this was the traditional way and it works for cmake now + Split long lines using double quotes instead of backslashes, makes the yaml file more readable and does not leak backslashes into the command line + Adjust cache to work in multiple branches, provided that the environment variables at the top of the file are set correctly + Do not let homebrew waste time cleaning up + Print logfiles in case of failure + Typos and other minor fixes. Change-Id: I1ac8afebbdbea50549a334c07b8b3117a823f0fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a0aaa4ae2e904e62a700ee6b6b73340498df2380)
* Extend alignment of QArrayData to std::max_align_t in allocationAndrei Golubev2021-01-262-8/+45
| | | | | | | | | | | | | | | | | | | | | Make stricter alignment requirements for the allocated header This strict alignment allows reallocateUnaligned() to property account for the padding occurring in cases when alignof(QArrayData) < alignof(T) <= alignof(std::max_align_t), which happens to be the case on e.g. 32-bit platforms with specific alignment requirements. This adds 4 bytes (the difference between alignof(std::max_align_t) and sizeof(QArrayData)) of overhead for QString, QByteArray and certain QLists on 32-bit systems. Task-number: QTBUG-90359 Change-Id: I8176a4cc79f100ee772b09425e88fe8ff3ae226a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 37e26d2b3011acc86bbda1e1f46114d7c8441915) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix populating selection clipboard with keyboardVolodymyr Samokhatko2021-01-265-6/+23
| | | | | | | | Task-number: QTBUG-59879 Change-Id: I6948919fc90995c60a34b5bd6b4a225c1a59fd9b Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 976f28e7bb7cddb11459600f293868abcf7da948) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Don't restrict non-modal file dialogs to open-dialogs onlyTor Arne Vestbø2021-01-261-16/+14
| | | | | | | | | None of the APIs used for non-modal operation require NSOpenPanel. Change-Id: I7ea49a8dad6e724a8a0d4321ea443d4cdcc5a6b1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit d7c07578bc02be1f0c3c3c3c3d64b020f2ec50ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Show system tray icon on mouse button press, not releaseTor Arne Vestbø2021-01-261-1/+1
| | | | | | | | | | | | | | | | This was a regression from 395e2d9bc48941d6. The system behavior is to show the menu on press, so we follow that. This is also documented at: https://doc.qt.io/qt-5/qsystemtrayicon.html#ActivationReason-enum Fixes: QTBUG-86518 Change-Id: Ia4dc5356bf0377a9d55f238caf5bf1becd95648d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit fce391fefb0bbdea220aa2c935ca6f154f6121cf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Github Actions: install old ccache version on WindowsDimitrios Apostolou2021-01-261-2/+5
| | | | | | | | | | | ccache 4.0 is crashing consistently. Fix is merged upstream, but it's not released yet: https: //github.com/ccache/ccache/pull/736 Change-Id: I27d154a1ff1ea3afe111bd8f931db58c6f518809 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e4194b6f9e90321a62f857434b42b597b2a8e15b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Github Actions: ccache updatesDimitrios Apostolou2021-01-261-2/+12
| | | | | | | | | | | | | | | | | | | | | + Specify the ccache cache directory to avoid the defaults, because ccache >= 4.0 puts the cache directory in system-dependent paths + Adjust sloppiness to increase cache hit ratio + print compression stats but don't err if `-x` flag is missing (only available only on ccache >= 4.0) + Print ccache config for debugging purposes + Enable ccache compression and limit size Regarding the last point, ccache < v4.0 optionally compresses using the zlib algorithm, but ccache >= v4.0 uses zstd and compression is enabled by default. By forcing compression to true, all platforms will need similar size cache. We have to limit it because the default (5GB) fills up the cache artifacts size that Github Actions offers. Change-Id: Iea72d08b223c611ee4a4443625647a1f01809b08 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 7ff1123711ea86a3be0654ac6b7648b92b337a7a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMimeDatabase/xml: support both 'xmlstarlet' and 'xml' for minifying XMLKai Köhne2021-01-251-0/+4
| | | | | | | | | | | | | | Commit 370324f6e2f3 changed the call to 'xml' to 'xmlstarlet' because some Linux distributions do not provide a binary called xml. Anyhow, the official Windows packages of xmlstarlet only provide 'xml.exe'. Therefore just check for both. Change-Id: I4381b256850e4101b760df21f2b0baffb4414620 Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 87ffd79622915509d73c04821ea1d2ada470ba2c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Don't exec file dialogs via runModal unless they are app modalTor Arne Vestbø2021-01-252-20/+40
| | | | | | | | | | | | | | | | | | | | | | | Non-modal or window modal dialogs are shown at show(), via AppKit APIs that are non-blocking. If we want to block execution at this point, we need to spin our own event loop. The runModal API of NSSavePanel is not meant to be used for blocking execution for already shown dialogs, but is reserved for application modal dialogs. This means we no longer trip over AppKit's understanding of what state the dialog is in, which would result in the dialog not reporting back any files. It also allows us to remove the guard for closing dialogs twice. We now also correctly close and end the application modal session if the dialog is closed programmatically using Qt APIs. Task-number: QTBUG-89959 Fixes: QTBUG-85547 Change-Id: Ida3dc404417789d4823822ecfbf0935591c23878 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit aa3b42d6342c6756c3ce941db0bbf1122ae48224) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update start of cmake/README.mdKai Köhne2021-01-251-18/+18
| | | | | | | | | | | | | | | Make the document reflect the current status of the port. Also link to https://doc.qt.io/qt-6/build-sources.html and https://wiki.qt.io/Building_Qt_6_from_Git as official sources on how to build Qt. This document should IMO rather concentrate on documenting the build system internals. Change-Id: If62cb966b41b7452edb5b63725756916b66affac Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit cf9683601857bb8ba0a5f24b13affa9de1e27ef8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QMAKE_PRL_LIBS entries on Windows for modules from other reposJoerg Bornemann2021-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | When building a repository != qtbase, like qtactiveqt, QMAKE_PRL_LIBS contained entries like Qt6Core and Qt6Widgets, meaning the linker line would contain exactly these arguments. When building an activeqt example with qmake, the link then failed with "LNK1181: cannot open input file 'Qt6Widgets.obj'". The correct entry would have been $$[QT_INSTALL_LIBS]/Qt6Widgets.obj. Fix this by determining the full path to the import library in the first step of the prl generation. This enables QtFinishPrlFile.cmake to recognize Qt6Widgets as Qt module and generate the right QMAKE_PRL_LIBS entry. Fixes: QTBUG-90520 Change-Id: Id0d9178da0e0dfc3ea4fadbbe8f5900d792ffc84 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 1ef5016bab3bce06ada14bc961a2a1db93d3060b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QComboBox/Fusion style: elide text when it's too longChristian Ehrlicher2021-01-231-1/+2
| | | | | | | | | | | The fusion style did not elide a very long text in a QComboBox as it's done in other styles / non-popup mode. Fixes: QTBUG-86632 Change-Id: I356a61809220d41717a9039d2b33dd706d034941 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 1a9095e1fa4bb5d74b91d1661d55893d0e8620e1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update TinyCBORThiago Macieira2021-01-2210-43/+110
| | | | | | | | | | | | Updated to commit e6a4fa4862bcc3a6f6b07cf9d9b784d0ab6068b4. Fixes: QTBUG-89650 Task-number: QTBUG-90214 Change-Id: I6edce5101800424a8093fffd15cdf6591cbf809d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit cbdf2ba46aed53d002b90d4d9683c28306f8e0a9) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Gracefully reject requests for absurd font sizesEirik Aavitsland2021-01-221-0/+6
| | | | | | | | | | Avoid overflows. Fixes: QTBUG-89899 Change-Id: Ic1a83c1704fe20be3d032358dc91ee8e751f2281 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 679750684087cad7a48921c4174a53cdf4855049) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix separately building SQL plugins with CMake 3.16Joerg Bornemann2021-01-211-1/+3
| | | | | | | | | | | | | | Also move the cmake_minimum_required call to the top of the file, because the line before already requires some policy settings, which is what cmake_minimum_required() is establishing. For the standard Qt build, we make sure to get appropriate policy settings by calling qt_internal_upgrade_cmake_policies(). Change-Id: If97556a9dd00646e83957959d0f9f16916625160 Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit d95a1a8bd4734df3c2b6b55e5eb7a86108b682d3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Hold references to zone IDs alive during useEdward Welbourne2021-01-211-2/+8
| | | | | | | | | | | | | Restore holding of a getID() call's return in a QJNIObjectPrivate eliminated in commit 78cde1bfd94521bbe4972f31a79c959d0990ea77; this keeps the Java internal object alive for its lifetime, where it might otherwise be garbage-collected before we're done with it. Fixes: QTBUG-88610 Change-Id: Id65b059012f7bd3377a6562c1b647feb75a13679 Reviewed-by: BogDan Vatra <bogdan@kdab.com> (cherry picked from commit d5eda37baaea20b2411b6ef1ca0d41a2a71a06a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SQLite: Update to 3.34.0Andy Shaw2021-01-213-730/+2030
| | | | | | | | | | [ChangeLog][QtSQL][SQLite] Updated to 3.34.0 Fixes: QTBUG-90226 Change-Id: I2a489bec1fee2bdee7ea474094ca3db308699753 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 722a7dda56a5ac6d43c686c4fbf7b105b5544d88) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Hardcode a special case of using qOverload for slots without argumentsJarek Kobus2021-01-2148-85/+200
| | | | | | | | | Fixes: QTBUG-90308 Change-Id: I35cd45679ded626654dd0e7e3eea8a7bb14c1d56 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 98a89fb711a15fcf9f541f7b4a8ae7492e5a445c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_socketnotifier: Fix timeout of QTcpServer::waitForNewConnection()Friedemann Kleint2021-01-211-2/+2
| | | | | | | | | The timeout defaults to 0, give it 5s. Change-Id: I975810a1ecee8bb8b3a3f143f1379a9a09589a40 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> (cherry picked from commit ad84332f2bbe10601ba4c21fd6d4a446d16ed94c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add new special QObjectPrivate::{connect, disconnect} for QMLAndrei Golubev2021-01-213-3/+80
| | | | | | | | | | | | | | | | | Original QML-specific connection mechanism ignores the receiver argument and uses sender as receiver. This causes uncontrollable memory growth in certain cases as connections on receiver persist even after receiver is destroyed New connect() with receiver parameter uses underlying API correctly, disconnect is provided for the symmetry (not sure it's really needed) Task-number: QTBUG-86368 Change-Id: I4580d75b617cb2c4dfb971a4dfb8e943e325572b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6f520abdab7120789800208dde837b3836f762cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Only check SDK major version for compatibilityTor Arne Vestbø2021-01-201-2/+2
| | | | | | | | | | The macOS SDKs now follow the same major/minor version scheme as iOS, where the major version is bumped for each OS release. Change-Id: I021421a9c58bb1ae64bc0c63b4215f14e4ada358 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit af0fa5cffe55b3ce9364fa2e6f4b76bc581c08c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: ensure we hide the edit menu while dragging on the selection handlesRichard Moe Gustavsen2021-01-201-0/+9
| | | | | | | | | | | | | | | | | | | | | iOS used to close the edit menu automatically when the user tapped on the screen (even for menus shown explicitly using the UIMenuController API). Apperently this has now changed (probably as a part of [UIMenuController setMenuVisible:] being deprecated in iOS 13). So we now need to hide it explicitly instead. Because of this, the edit menu would be showing together with the magnifier class while the user was dragging on any of the handles. This patch will fix this, so that we close the edit menu explicitly whenever the user starts dragging on a handle. Fixes: QTBUG-80298 Change-Id: Iff2032d64db1b582fa7f048c6a1f37ec8a1528af Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 2e35a03cd624c006b92cb95847231c8b1efde45b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rasterizer: compute intersection factors only when neededEirik Aavitsland2021-01-201-7/+12
| | | | | | | | | | Fixes oss-fuzz issue 29285 Change-Id: I8f7e0bc898b119d153a36cef5a74371249ed7686 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io> (cherry picked from commit e1ed570f9d0ec3998f130e2c3870ef49e7994dbf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: ensure we close the edit menu when the user taps outside the input areaRichard Moe Gustavsen2021-01-201-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | iOS used to close the edit menu automatically when the user tapped on the screen (even for menus shown explicitly using the UIMenuController API). Apperently this has now changed (probably as a part of [UIMenuController setMenuVisible:] being deprecated in iOS 13). So we now need to hide it explicitly. Because of this, we no longer close the edit menu if the user taps outside the input area. This patch will fix this by updating the logic in QIOSTapRecognizer to close the menu explicitly. There are some more details around when to show or hide the menu, which is commented on at the relevant places directly in the patch. Fixes: QTBUG-90332 Change-Id: I336e3f4003817b39c7abf63f963fde1f3ef87c20 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 427e639275be379e3577cd3b3c8a63a6b5e46d46) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QTzTimeZonePrivate::displayName()'s fallbackEdward Welbourne2021-01-201-1/+2
| | | | | | | | | | It previously fell back on abbreviation, a very poor choice. The base class does better than that, so use its implementation instead. Change-Id: I47cbfce815cd8b2b533d9c6aeebcf398e5852d02 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f9fff26b2db8152dcae26c92054f031bdebd7bc1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make QStyle::proxy() always return the leaf proxySergio Martins2021-01-201-2/+4
| | | | | | | | | | | | | | For example: fusion -> proxy1 -> proxy2 Now returns proxy2. Fixes: QTBUG-85556 Change-Id: I2a60329f948b59ef7d0752d273bee3854a200547 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 61c3f3539c3d2d7dc867c3fef0270a2f5c9ed376) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSsl: fix OpenSSL DLL names for Windows on ARMCameron Gutman2021-01-201-5/+9
| | | | | | | | | | | | OpenSSL adds an '-arm'/'-arm64' suffix to the DLL names when building for VC-WIN32-ARM or VC-WIN64-ARM. This needs to be accounted for in Qt to find the OpenSSL DLLs correctly. Fixes: QTBUG-89647 Change-Id: Ibc9b81e06f8e64c0676f335e13024fa7fe3a4fa3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit c111aad270f1d51c2e870ee25e9a6bba64b3cecc) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix build with GCC 11: include <limits>Thiago Macieira2021-01-202-2/+5
| | | | | | | Fixes: QTBUG-90395 Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40 (cherry picked from commit 9c56d4da2ff631a8c1c30475bd792f6c86bda53c) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* [Android] Fix Text select handle misplaced on fields inside QDialog issuesPekka Gehör2021-01-201-2/+2
| | | | | | | | | | | | Get cursorPoint from a mapToGlobal with a cursorRectangle of the selected inputMethod Fixes: QTBUG-65229 Fixes: QTBUG-58503 Change-Id: I89b056fa91c59d260f02164c9bd6672b5ada64d6 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit a5bb7b3ca510c301baf84e1dd46d5aeeb4986eb2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Generate Qt6EntryPointAdditionalTargetInfo independent of platformAlexey Edelev2021-01-201-7/+10
| | | | | | | | | | Move AdditionalTargetInfo generation for EntryPoint target out of WIN32 specific block Fixes: QTBUG-90414 Pick-to: dev Change-Id: I8dc34c939f12ef2073de630d4440a0892d8be909 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix lancelot GL painting test for GLESEirik Aavitsland2021-01-201-5/+8
| | | | | | | | | | RGB10 internal texture format is not supported on GLES, use RGB10_A2 instead. Change-Id: Ib43eb99b170f441e886be50d29a6a5f7696c05c7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 167bcafcb6b1988047bec8b4d67c994fc8c85c14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Remove DontConfirmOverwrite workaroundMorten Johan Sørvig2021-01-201-9/+2
| | | | | | | | | | | | | Does not work any more on recent macOS versions. As a bonus, Qt now handles file names which contain “___qt_very_unlikely_prefix_” correctly. Task-number: QTBUG-39791 Change-Id: I944a68efa18edc72939d953ab32ecb53d8f8e1c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit fded886ff4b9869c1a9e016e3fae05cc409c9ccd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Finish composing text before Key handlingBartlomiej Moskal2021-01-191-0/+11
| | | | | | | | | | | | | If the sendKeyEvent was invoked, it means that the button not related with composing text was used. In such case composing text (if it exists) should be immediately finished. Fixes: QTBUG-85715 Change-Id: Ifbca067805b8d20f6a90f95b27210595abed964a Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 0d5b43bed4d75ce4d1f1c5a7b953288f5570350d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix framework path for *_header_check targetsJoerg Bornemann2021-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | When building a Qt module against an installer-provided Qt on macOS, the module pulls in the headersclean feature that creates the *_header_check targets. Those targets try to compile the public headers of the module, and the compilation command contains the -iframework argument. That -iframework argument is supposed to point to the directory where the Qt libs are installed. However, it pointed to the original CMAKE_INSTALL_PREFIX of the machine where Qt was packaged. Use the QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX variable instead that contains the real installation location, even for an installer-provided Qt. Fixes: QTBUG-90402 Change-Id: I27de8b3cc816488c2716042383b334d5c421452d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit bd8d74e0e265297d61fe3b42f71a282bf381c379) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing since to QEvent::copy docsNicolas Fella2021-01-191-0/+1
| | | | | | | Change-Id: Idfadc1801b0e97a5030d2784a65ae658900efd12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 9b2df27bb3a5e8fb788f7274013aa66d32d1250d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_socketnotifier/unexpectedDisconnection: Extend blacklisting to all ↵Friedemann Kleint2021-01-191-2/+2
| | | | | | | | | | | windows versions The test has been failing frequently, recently. Change-Id: I3ae00a64f67e4b6a0b5ade0c660805f4d12f8317 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 0b4717097ebf9614937a03407e741267a6d39a39) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: skip tst_QFile::moveToTrash()Assam Boudjelthia2021-01-192-3/+3
| | | | | | | | | | | Android doesn't have a trash bin, so this test is not valid for that platform. Fixes: QTBUG-89398 Change-Id: I119b25682ba18e18466b5687cae369445dc73311 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 0392dce4f0a2093987ab45c48f0748c3dd97e7fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix problems with offset-derived ids for QTimeZoneEdward Welbourne2021-01-194-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a time-zone from a UTC+offset name that isn't known to the system, QTimeZone (since the fix to QTBUG-77738 in 5.15.0) falls back to constructing a suitable UTC-offset backend; however, the id of this is not guaranteed to match the id passed in to the constructor. In all other cases, the id of a QTimeZone does match the id passed to its constructor. Some utcOffsetId testcases had different id() than the id passed to the constructor, due to mismatches where a zone was constructed using the fall-back but the generated id included its minutes (as :00) or omitted its seconds. The omission of seconds is clearly a bug, but we also don't want to include :00 for seconds when it's not needed. So change QTimeZonePrivate::isoOffsetFormat() to accept a QTimeZone::NameType to configure how much we include in an id. Its callers other than the relevant constructor (from offset) still get minutes, even when :00, but will also get seconds added if that isn't zero; and the constructor from offset now gets the short form obtained by omitting all trailing zeros. Since all valid whole-hour offset names that do include :00 for the minutes field are in fact known standard offset names, the elision of minutes will only affect zones created by ID in the case of a whole-hour offset given without :00 minutes specifier, so these shall necessarily in fact get the ID passed to the constructor. Creating by UTC-offset with a name that specifies zero seconds will result in a QTimeZone instance whose id() differs from what was passed to its constructor (eliding the :00 seconds and potentially also minutes, if also zero) but this should be the only case where a QTimeZone's id doesn't match the one passed to the constructor, when constructed by id. Fixed inconsistency between the offset-constructor's declaration (taking offset as int) and definition (taking qint32) in the process. Added an id check to the utcOffsetId() testcase. Amended two tests of offset-derived time-zones' IDs, added comments to make clear how one of those differs from a matching standard name test and converted two uses of QCOMPARE(, true) to QVERIFY(). [ChangeLog][QtCore][QTimeZone] QTimeZone instances created by offset from UTC (in seconds) shall now only include minutes in their ID when the offset is not a whole number of hours. They shall also include the seconds in their ID when the offset is not a whole number of minutes. Task-number: QTBUG-87435 Change-Id: I610e0a78e2aca51e12bfe003497434a998e93dc7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 50c63446f525a8625b6315597cb0897d89908d6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Clarify setLibraryPaths behaviorPaul Wicking2021-01-191-3/+4
| | | | | | | | Fixes: QTBUG-89130 Change-Id: Id8460fd00dcfdcca174d523f8d97baef1a764f6f Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit efa5a699729c6ff9f9d7991d12ed70139e3be669) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* ItemViews: Don't remove items on internal moveChristian Ehrlicher2021-01-192-4/+8
| | | | | | | | | | | | | | | When an itemview only allows internal moving of items it can happen that the target accepts the drag'n'drop operation since it's out of the control of Qt (e.g. Recycle Bin or an other application). Due to the nature of a move, the original item is deleted. Therefore check if the internal move target is the same as the source and don't delete it otherwse. Fixes: QTBUG-86020 Change-Id: I69de4b8d76d1b0f57338b402aee87580226cd6cb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 12d8bb0709bf7982061cb0c3e608e4a581892e35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix small typo in the QMdiArea documentationOliver Eftevaag2021-01-181-1/+1
| | | | | | | | | | Added missing whitespace character in the documentation for QMdiArea, in the 'detailed explanation' section. Change-Id: I6be1d664bc15e3e461c5fc3d8f82311cc6ea60ea Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 3cb2b5bfe3e3c84dcd4c1a04c8c981dbaf85f0a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtEntryPoint: Fix linking Release against RelWithDebInfo with MSVCJoerg Bornemann2021-01-182-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be able to link a Release user project against a RelWithDebInfo Qt we set several IMPORTED_*_RELEASE properties in the *AdditionalTargetInfo.cmake file of each Qt module. The EntryPoint module however is a bit special as it is an INTERFACE_LIBRARY linking publicly against a static library (EntryPointimplementation). Its *AdditionalTargetInfo.cmake file was almost empty, because qt_internal_export_additional_targets_file was called before EntryPointImplementation was set up. Also, qt_internal_add_module, which calls qt_internal_export_additional_targets_file, does not know that we want to export the EntryPointImplementation target. We fix this by telling qt_internal_add_module(EntryPoint) to not generate the *AdditionalTargetInfo.cmake file and call qt_internal_export_additional_targets_file later to take the targets EntryPoint and EntryPointImplementation into consideration. qt_internal_add_module learned the option NO_ADDITIONAL_TARGET_INFO to turn off the generation of *AdditionalTargetInfo.cmake files. Fixes: QTBUG-90039 Change-Id: I68ec7125b538a57567035e7adb8dac3b213f95e6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit b0add5bf2f56c2afc8bdf27ccbb153414617250b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* eglfs: Use drmClose in drm/EGLDevice backendLaszlo Agocs2021-01-181-1/+1
| | | | | | | | Fixes: QTBUG-90350 Change-Id: I29a71e4abc2df7b777a895792bc5385a89223895 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 957344123672e891a25e55b54dcb012d2017b27a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>