summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Android: use libexec path for qmlimportscanner6.2Assam Boudjelthia2022-04-191-3/+5
| | | | | | | | | This should've been done already for Qt 6.2. Change-Id: I2f943254698a4f0f2742619fd7fcab9ac3a5014a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e629efc82c2e26559159abfe44d8414997bc3d68) Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Explicitly check for atomic addition and relaxed load operation supportMoody Liu2022-04-181-15/+19
| | | | | | | | | | | | | ...and properly find and link against `libatomic` using find_library. This fixes the qtdeclarative build on the RISC-V platform. Initial-patch-by: Sprite <SpriteOvO@gmail.com> Task-number: QTBUG-99234 Change-Id: I2b5e4812886ce45cb02bed3106ce8c519b294cbe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 4088b27b9397fa9877bf60b8e707bba5dc51e9cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* FileChooser portal: set current_nameIlya Fedin2022-04-171-1/+6
| | | | | | | | | Fixes: QTBUG-100297 Change-Id: I5d41e01aafeccce2d886debdb595b4c87b03a043 Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 974a7bd6e0ece921e699df6c2b346f944f723b83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix race condition in futex-based QSemaphoreAllan Sandfeld Jensen2022-04-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add one and reset the wakeAll bit atomically. This avoids a race in a case where an acquiring thread is owning the semaphore, and deleting it after a set number of releases (one for each thread referencing the semaphore). Two releasing threads could enter the if statement under futexNeedsWake(prevValue), the counter been incremented at this point and reached the value being acquired, meaning the thread acquiring can be awakened by just one of the two releasers, delete the semaphore, and then the second releaser would access the now deleted semaphore. The patch avoids that by unsetting and reading the wakeAll bit atomically, so only one thread will try to wake all threads. Fixes: QTBUG-102484 Change-Id: I32172ed44d74378c627918e19b9e1aaadb5c6d1d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 830b1550de303dd59c29a87c28e44fa41112b8f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix error message for failing OpenGL testsJoerg Bornemann2022-04-141-1/+1
| | | | | | | | | | We still mentioned the QMAKE_* variables. Replace them with the OpenGL_DIR CMake variable. Change-Id: If53c2bff030cf03cb43d10f738949f59ac8dd730 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit fd8441a97cdd212098aeb214b2a5b2caaf108e3c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QXmlStreamPrivateTagStack: don't fail on more than 2Gi chars in the tag stackMarc Mutz2022-04-141-5/+5
| | | | | | | | | | | | | | | | | QXmlStreamPrivateTagStack holds the string data in a single large QString, which, on 64-bit platforms, can hold more than INT_MAX characters' worth of data. However, the code managing this QString still used int variables instead of qsizetype, making failure for such large tag string data all but inevitable, even though I didn't go to the length of actually constructing a failing test case. Fix by using qsizetype instead of int where required. Fixes: QTBUG-102467 Change-Id: I50b7e194e43f3c7dce69c6e1fd4682fc517dd7d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a986a8c0997bfa87e91d37baf108bb07c8fa1c2d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* XmlStringRef: fix length truncationMarc Mutz2022-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | The XmlStringRef(const QString*) ctor calls the (const QString *, int, int) ctor, passing QString::length() as the third argument. If the input QString had more than 2 Gi characters, the resulting XmlStringRef represents only the prefix of the input (mod (INT_MAX+1)). Fix by making the delegatee ctor use qsizetype instead of int, allowing to pass data through without truncation. [ChangeLog][QtCore][QXmlStreamReader] Fixed several bugs regarding handling of documents larger than 2Gi characters on 64-bit platforms. Fixes: QTBUG-102466 Change-Id: Ie48274190ac359f62d3ec3d8fe60eb43cc2c362a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9c028b0ff4e684d9bb27df7171575a618e892267) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QObjectPrivate: use placement new/delete for SignalVectorThiago Macieira2022-04-141-2/+6
| | | | | | | | | | Just to be pedantically correct, but also makes the construction code slightly more readable. Change-Id: I29f1c141c0f7436393d9fffd16e2bbf0f361c024 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit d1e9cab81ca94f450b1391822091ed81fec60c92) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QObjectPrivate: use ConnectionList's constructor instead of copy-assignmentThiago Macieira2022-04-141-1/+4
| | | | | | | | | | | | | | | | For all new elements, this is the correct thing to do. This seems to work around an MSVC compiler bug on ARM64. It also seems to generate better code for x86-64 too, as a nice bonus. See: https://developercommunity.visualstudio.com/t/codegen-elides-initializers-when-copying/10004323 Before: https://msvc.godbolt.org/z/Wcd4haaPd After: https://msvc.godbolt.org/z/vWYjazWGr, https://gcc.godbolt.org/z/hdsvTq9nE Fixes: QTBUG-102246 Change-Id: I29f1c141c0f7436393d9fffd16e2bbbf4c0fe54d Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit bc6087fce259fe600c5d12785fa5f293f129965b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Don't assert in add/removeWindowAssam Boudjelthia2022-04-131-4/+6
| | | | | | | | | | | | | No need to assert, returning when the window is already added or not removed is enough. Fixes: QTBUG-100173 Change-Id: Id491f17612ce42c4e26e9d41ad38f0a6372775bd Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 2da00bfc3a4361eb1bf2e008ddaceb215c63934d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: wrap QAndroidInputContext's m_focusObject in a QPointerAssam Boudjelthia2022-04-121-1/+1
| | | | | | | | | | | | To make sure we don't end up use a dangling pointer for m_focusObject. Task-number: QTBUG-102447 Change-Id: I75058040be109a39f830bc706efe85969ffbc8ec Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 0742e5770bb2fc133986c5151bfa18a2e8d4d231) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Suppress cmake warning about empty string argumentAlexey Edelev2022-04-121-1/+7
| | | | | | | | | | | | | | | | When generating .pc files there is a warning when executing QtFinishPkgConfigFile.cmake: Ignoring empty string ("") provided on the command line. This happens because the 'postfix' argument is a part of the script command line even if it's empty. It also makes no sense to check if 'postfix' is empty using genex, use configuring-time check instead. Change-Id: If52d9634f4885caefb828976b3c99592a6db3d3c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 8eef32d460d06f823fa20b364e3ffe6ca5cd6977) Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Remove the LINK_LANGUAGE genex condition when generating .pc fileAlexey Edelev2022-04-121-0/+1
| | | | | | | | | | | | | Conditions with the LINK_LANGUAGE genex are not parsed correctly when generating .pc file. So link options will be added unconditionally. Amends d1e02c385539ce971fbad207ba9aaa32be9c7bac Fixes: QTBUG-101723 Change-Id: Ib837b3f3429d195a469450ef25af9630ad7d15e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 97ef7752a2db871d45c8e434d15e0ccec015cd65) Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake build: generate pkgconfig for public modulesMartin Reboredo2022-04-128-18/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the update to the CMake based build system the ability to generate pkgconfig files, like it was with QMake, was lost. This patch adds pkgconfig generation again via a new internal command named qt_internal_export_pkg_config_file. The functionality of this command consists in checking if the target is internal. Then gets the compile definitions. It performs a search for dependencies that is somewhat similar to qt_get_direct_module_dependencies, although it won't recurse down for more deps. Each dependency is then again, checked if it's internal or has a public interface. Later these deps get deduplicated and lastly a pkgconfig file is filled. The resulting pkgconfig files of many of the Qt6 packages were validated via invocations of `pkg-config --validate` and `pkg-config --simulate` commands and later used to build local projects plus tests that use the pkg-config provided details at compilation time. Although it has some limitations, with qt_internal_add_qml_module if it specifies non-public deps these won't be listed and with non-Qt requirements, notably in static builds, not being appended to the PkgConfig file. Task-number: QTBUG-86080 Change-Id: I0690bb3ca729eec328500f227261db9b7e7628f6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 5b07f14a4ff6b08887473b1b583ee2f71dec6f76) Reviewed-by: Martin Reboredo <yakoyoku@gmail.com> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Android: skip few tst_qopenglwidget tests that crash on CIAssam Boudjelthia2022-04-121-1/+28
| | | | | | | | | | To allow other cases to run while finding the reason. Most of these cases fail only on CI and not locally. Task-number: QTBUG-102043 Change-Id: Ib552ab00b4232f6aabdf85acf050633251d9e71d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit c5dd2c1f35bc7a21c6a2fe18e1e573bcab020bec)
* Fix use-after-free because QByteArray::data() was copying dataDimitrios Apostolou2022-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | Previously there was a mixture of buf.constData() and buf.data() with buf not being const QByteArray. As a result, buf.data() returned a re-allocated buffer and texData was keeping pointers to that one, which became invalid once the function returned and the re-allocated buffer was cleaned up by destructor. Change buf to const QByteArray so that there is no difference between data() and constData(). Additionally convert all constData() calls to data() to avoid confusion. Detected by Address Sanitizer on testcase tst_qtexturefilereader::checkMetadata() Change-Id: Idb6f6141898678bf95ed9233a92b7bb3ad12e250 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit b8677bd31fdb8e0cc897dcd4e39e121baa3e9722) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: use BCP 47 tag to create a correct Locale for QTimeZone::displayName()Ivan Solovev2022-04-102-11/+55
| | | | | | | | | | | | | | | | | | Before the patch we tried to create a java Locale object by passing the human-readable language, territory and variant strings. However, the Locale constructor accepts ISO-defined codes. Fix it by using a factory method Locale.forLanguageTag() [0] that constructs a Java Locale object based on BCP 47 tag. [0]: https://developer.android.com/reference/java/util/Locale#forLanguageTag(java.lang.String) Fixes: QTBUG-101460 Change-Id: If414c66cf0e5b7e8299ffc3a6038b6f9eb79d5ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 44f3fe1cf4e2319e012207eba3afe7adfe09cad6)
* Android: minor refactor in QTimeZonePrivate backendIvan Solovev2022-04-101-6/+5
| | | | | | | | | | | getDisplayName() now returns QString instead of QJniObject. It's more clear and allows to save some QJniObject::toString() calls in other parts of code. Change-Id: I0f2061cf1dff21c09c2272bf1e9126ff1ea0ed3e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit c366d57594bfb84c215fda2b101bcd7f37b93dcd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: enable tst_QScreen::grabWindowIvan Solovev2022-04-102-7/+14
| | | | | | | | | | | | | | | | | | Two things are done here: - use showNormal() instead of show() to get an expected widget size. - skip the test if HighDPI scaling is enabled with non-integer scaling factor, because there can be rounding errors. Also had to backport the unconditional delay after showing the window (introduced in 6.3), because the emulator was not fast enough to actually render the window. Fixes: QTBUG-87390 Change-Id: I653a17bac2142838b03a328e1629582384b6c7b3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit aa451b13b0914e3c33a4e05e792aa8c5effa7a3a)
* Fix check for pcre2 using cmakeJonas Kvinge2022-04-091-1/+1
| | | | | | | | | | | | | | | When PCRE2 is compiled using cmake, a pcre2 cmake file is installed and Qt fails to configure because components isn't specified for find_package. In recent PCRE2 releases components needs to be specified for find_package. Fixes: QTBUG-102358 Change-Id: Ib842b2c4b1c0bf38aa5da5475eaa2b3c56c6b822 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 1007aac63a378c1b09f221f9b58b65bb56f9e9e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix crash in tst_qmltc_examples on AndroidAndreas Buhr2022-04-081-1/+1
| | | | | | | | | | | | | | | | tst_qmltc_examples failed because m_accessibilityContext could become a dangling pointer if the object in points to gets deleted. This resulted in a crash. Amends e0c61193ea8f6462192d2ef7f1d48d8fa3e38c99. Task-number: QTBUG-101865 Task-number: QTBUG-95764 Change-Id: Ie85118429b1afa6e4a41f899ca065f493e166570 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit f9297565784e7eae87588417c8080cc1c9eede5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: Blacklist failing networks tests for QNX qemuPasi Petäjäjärvi2022-04-083-0/+29
| | | | | | | | | | | | | Most likely related to qemu network configuration which cannot be modified. Reason is that in QNX there is tool which can be controlled qemu configuration, and it does not provide options for more finer grade network configuration. Task-number: QTBUG-101274 Change-Id: I660466e36252e902a2314fb3f4988c531cda9214 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 9e0ba8b927d0a0b826ba7ff19b6e7d943d0d1b8e)
* Fix assertion failure when parsing a doubly-invalid date-time textEdward Welbourne2022-04-082-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | When the date-time string falls in a spring-forward (so is invalid) and one of the fields of the parsed string doesn't match the format it's meant to (e.g. a single-digit seconds field when format ss was specified), a check that the current fall-back date-time is between the minimum and maximum for the parser object failed, triggering an assertion. In any case, an invalid default-value wasn't useful to the code that parsed a single section of the date-time string, so brute-force the current value to a valid date-time (when possible) using the usual round-trip via milliseconds since the epoch. Added the test-case which first revealed the problem, plus a couple more informed by it, to exercise the same code-paths with fewer things failing. Fixes: QTBUG-102199 Change-Id: I658308614505ef25f4c97d0de6148acb54a65a0f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9fee35a2eda68b5968d911d5e14d298b91418d2c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix backingstore fractional DPR glitches for widgets in child windowsEirik Aavitsland2022-04-071-2/+12
| | | | | | | | | | | | | | | For such widgets, QBackingStore::flush() takes both a region and an offset. Both must to be DPR scaled to the native backingstore coordinates. When the DPR is fractional, it can happen that the rounding of both effectively accumulate into an off-by-one error. Detect and adjust for this situation to avoid painting glitches. Task-number: QTBUG-96223 Fixes: QTBUG-102366 Change-Id: I9ccd4ee54660419a1db8c27358f1419de58ae932 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit f5174abec3720b7deec3157e482ca62c0d90fb19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: fix androidtestrunner failure parsingAssam Boudjelthia2022-04-071-39/+100
| | | | | | | | | | | | | | | Make sure androidtestrunner reports the following cases as failures: * XPASS test case * The test output doesn't have closing block. * The test result read from output.txt is empty Fixes: QTBUG-100312 Task-number: QTBUG-100470 Change-Id: Ifbb3c31fa22159df0c39b264e95e2f1ccd16e5ff Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit bc71496a346f64be5437d6106a90e7cb219d794a)
* Remove QEXPECT_FAIL for test passing on AndroidVolker Hilsheimer2022-04-071-3/+0
| | | | | | | | | | | | | | The test has been XPASS'ing recently on Android. Reverts 67e209f59fed638e93402bf2eb63fba56195e244. Fixes: QTBUG-69216 Change-Id: Ic629cc28936e0ef27277c243717e97226bf01b1c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dimitrios Apostolou <jimis@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 35e938c2d8966dd87cdcf700788a947e71d43984) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CoreText: Add note about why we defer population of theme font descriptorsTor Arne Vestbø2022-04-071-0/+6
| | | | | | | Change-Id: I7018a92467c6db1b9d04b88e50113ba9c9d1a3b7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit a068f2d7c9967b6e12eaf8453760d462cbce40db) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Blacklist quitOnLastWindowClosedWithEventLoopLocker on B2QtTor Arne Vestbø2022-04-071-0/+3
| | | | | | | | | It's flakey according to http://testresults.qt.io/grafana/goto/1WdyblA7k Change-Id: I4e5a3492d55222675534359416c1017dcba2cbfe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 10dc445d7ce59ef828042310f72e681c735b9644) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Allow duplicate entries in file dialog name filterTor Arne Vestbø2022-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Using QFileDialog::setMimeTypeFilters() with a list of mime types may in some cases result in the same name for two different mime types, for example both "image/heic" and "image/heif" will result in the name "HEIF image (*.heic *.heif)". When the resulting name filter is propagated to the platform layer, we add entries to a NSPopUpButton, but the convenience API we used, addItemWithTitle:, does not allow duplicates. As a result, the entries in the menu didn't match the list of name filters we then looked up and applied to the actual file name filtering, causing off by one errors. Ideally we'd make sure the name filters are unique and well formed all the way from the QFileDialog to the platform and back, but for now we work around issue by using the NSMenu API directly, which does allow for duplicate entires. Fixes: QTBUG-101361 Change-Id: Iee3db4e6c5adfdbdd7f0094b4efd65aa2ecc0f57 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit e702b64b34aff68122224f091d3b94e616771555) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Network[doc]: Update Qt6-changes with QNetworkInformation detailsMårten Nordheim2022-04-071-2/+11
| | | | | | | | | | | | I always meant to remove the note and update it with a link, but forgot. Qt 6.2 details only so it can be easily cherry-picked there. Change-Id: I4db3919b71971a997ac8a988951b01c984a8a791 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 188cbc041791b65376d1e99c50f9535225e10d85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove mention of Q_GLOBAL_STATIC being more thread safe than local staticsTor Arne Vestbø2022-04-071-4/+0
| | | | | | | | | | As of C++11 local statics are guaranteed to be thread safe, so this advantage doesn't hold anymore. Change-Id: I9ac34b8af30e44ff8134e5f81f45c8aa0f8ddcc9 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 27f6c4106c55c761d39d5743255a4c963ba4430f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake uses Desktop tslib for INTEGRITY configuration by mistakeTatiana Borisova2022-04-071-1/+1
| | | | | | | | | | IGY doesn't provide tslib backend. QT_FEATURE_tslib should be OFF. Task-number: QTBUG-102121 Change-Id: Id6417b92864312f6437c773a472aff8517b6e5dc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 64fc50e309f51e7c837c133cb4ccc4ca4d8a87a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Warn against using the screen's refresh rate for driving animationsTor Arne Vestbø2022-04-071-0/+5
| | | | | | | Change-Id: Id26aae76792a4109b2ea6cca3db69ab505495d65 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit c1b0b061e14d1b41551dd0035a5c1f2f833f944e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't blit individual rects of region when when scrolling backingstoreTor Arne Vestbø2022-04-074-8/+8
| | | | | | | | | | | | | | | | | | | | | | | The QPlatformBackingStore::scroll() API takes a QRegion as input, but we have no guarantee that the individual source and destination rects of the region will not overlap each other when applying the scroll offset, so we can't naively iterate the rects and call qt_scrollRectInImage for each one. The reason this didn't cause any issues in practice was that the QWidget repaint manager was always passing in a single rect as the region. On the other hand, the client has requested a scroll of the given region, so it might assume any other part of the backing store is preserved as is. Scrolling the bounding rect of the region violates this assumption. Amends 19ef76b0606621f189d3bc56549d200f2f5ebb25. Change-Id: I27934dd6685311c0b53ea2adb60fa5997e360f6c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 04837c16873e80ff02801a73126121040a6540ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Graphicsview: Avoid background clearing glitches under fractional DPREirik Aavitsland2022-04-061-0/+5
| | | | | | | | | | | | | | | | | | | | QGraphicsView enables autoFillBackground on the viewport widget, so the dirty area is cleared before repaint. Then QGraphicsView fills the same area with the background color. However, under fractional DPR scaling, the scaled version of the dirty rect may end up covering only a fractional part of the pixels on the edges. If antialising is enabled, such pixels will be only partially filled with the background color, leaving the clear color partially visible as glitches. This can be seen in the dragdroprobot example. Fix by disabling AA during background filling, as it has no purpose then anyway. Task-number: QTBUG-96223 Change-Id: Ica00997141701faa0cf368caced84ae50ba017d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6963190581eb49b96c68b0e61304663672f1e42b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make keyClick safer for QWindows going away on presses or during waitAllan Sandfeld Jensen2022-04-061-0/+3
| | | | | | | | | | We already have similar logic in the QWidget variant. Task-number: QTBUG-102253 Change-Id: Idf1e3474f3189909f1cba7d5dedc2cde12f1338e Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit ca106e261e491c637681c22f537ba5d4eaf0513f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Q[Multi]Hash: fix squeeze()Ivan Solovev2022-04-062-15/+123
| | | | | | | | | | | | | | | | | | | | When calling QHash::reserve(), or when creating the internal QHashPrivate::Data structure, the value 0 for the size parameter is reserved for performing the squeeze operation. However commit 8a984ab772dd194e39094e728b869e65912912a7 broke it, by using the 0 value in QHashPrivate::Data constructors as a mark that no resizing needs to be done. This patch reverts the problematic commit (also applying some later fixes to the code), and adds the missing tests for Q[Multi]Hash::squeeze(). Change-Id: Id644df7b2beb008e6a37b2c89b709adfbd893e25 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 7c9afa8d00cc2bbc1b102eef6e76c23e07c7833f) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Q[Multi]Hash::reserve(): do nothing if desired size is less than currentIvan Solovev2022-04-062-0/+37
| | | | | | | | | | | | | | | | | Calling Q[Multi]Hash::reserve(n) when n is much smaller than the current amount of elements in the hash, could result in an infinite loop, because at some point the algorithm could not find a free bucket for the element. Fixing it by returning early if the new desired capacity is less than current. Fixes: QTBUG-102067 Change-Id: I38ef0b2168c4e2a317eedf91b2155b1fdffb1c27 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d11941db41f00525f907417bbcd6ac5ee30d8485) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Conan: Resolve the 'qt_host_path' before assigning it to 'QT_HOST_PATH' envIikka Eklund2022-04-061-0/+8
| | | | | | | | | | | | | The value of the 'qt_host_path' option needs to be resolved fully before assigning it to 'QT_HOST_PATH' env. This icludes expanding ~ constructs, resolving symlinks, expanding vars and relative paths. Change-Id: Ia338105ccb4a203796864304f463b222163c5193 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 878984a014154f6ab2f92c223c61a44e02c74aec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve surface format request for baseline test of GL painterEirik Aavitsland2022-04-061-3/+17
| | | | | | | | | | Different platforms and drivers hae different defaults, so make sure to request what we need. Change-Id: I54ae6e0770fea53fbf59c86d7e55aa5897292b67 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 0ff7328f376a9a1f1d560e1a2bd9f818ae47f8ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: blacklist fromHtml:preformats with embedded backticks for QNXPasi Petäjäjärvi2022-04-061-0/+2
| | | | | | | | Task-number: QTBUG-100515 Change-Id: I82b06ef1d2e275e256f8d811bc70f425c6e6bf7e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a322af7df434a367d560a3cbdc0b53e314477056) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Detach for colortransforms of indexed formatsAllan Sandfeld Jensen2022-04-061-3/+5
| | | | | | | | | | | We were triggering detach during the transform, but the short-cut for indexed formats wasn't triggering that. Instead make the detach explicit and avoid it during the loop. Change-Id: I0f12b7f93841342a0770ce3d3c78f26ad19d8dac Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit dbae10487e302d36ab32f1e812834b53c1fbec71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QBuffer: fail early in seek() beyond QByteArray's max capacityMarc Mutz2022-04-052-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 32-bit platforms, the range of qsizetype is smaller than the range of the qint64 used as a parameter in seek(). When seek()ing beyond the current buffer's size, the old code relied on a write() to fill the gap with NUL bytes. This has two problems: First, this may allocate a huge amount of memory just to find that it cannot write that much, possibly even taking the program down when the allocation in the QByteArray ctor fails, instead of returning false from seek(). Second, the QByteArray ctor to which we pass the gapSize only takes qsizetype, not qint64, so we were writing data of size gapSize mod (INT_MAX+1) on 32-bit platforms, which may succeed, just to find that that wasn't the number of bytes we expected to be written. By that time, however, the internal buffer has already been enlarged. Fix by checking whether the desired seek position is within the limits that QByteArray can contain early on, before attempting to construct such a large QByteArray. [ChangeLog][QtCore][QBuffer] Fixed silent data corruption on 32-bit platforms when seek() fails due to position > INT_MAX. Fixes: QTBUG-102274 Change-Id: Ib63cef7e7e61ef8101a5f056c7b2198bb7baa228 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4bc85b9850303fa20206f8774af88d72593d3454) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qmessagebox for AndroidAndreas Buhr2022-04-051-1/+1
| | | | | | | | | | | | | tst_qmessagebox was disabled because it crashed. It does not any more. Now it hangs, which is a new problem. Fixes: QTBUG-87671 Task-number: QTBUG-101217 Change-Id: Iec15cf82a4112ee79182ec091622e40147bd3e7f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit ea6f5561861103a2964cc9af223f68ad514dcca7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Extend androidtestrunner default timeout to 8 minutesAndreas Buhr2022-04-051-1/+1
| | | | | | | | | | | | | | | | | | | qmake had a feature to set androidtestrunner's timeout. This feature is not yet ported to CMake. So with CMake, we always have androidtestrunner's default timeout. Which was five minutes. We have several tests which take just shy of five minutes and are thus flaky. This patch extends the timeout to eight minutes. This should be a temporary workaround until the timeout feature is implemented in CMake. Task-number: QTBUG-101596 Change-Id: Ia67ed6ab40a40f1b82861bd15bd04528ee9334ee Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit edf9b23145f1e428c899b4696c9f361c165d7eb4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Reorganize work with graphical libraries on INTEGRITYTatiana Borisova2022-04-056-4/+65
| | | | | | | | | | | | | - Currently we manually unpack all platform libraries, that are required for GUI apps, and pack it into single eglmegapack.a library. It could be better do not execute such additional step, but have possibility to add required graphical libs to cmake interface lib via toolchain file list variable. Change-Id: Ic4122600f02e6828d528ee4f00075f8c27f42e38 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 8116fdde1c13fe00fb03414b56da2d66e215f279) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: use HOME directory for QNX license and PATH in Linux host buildsTommi Mänttäri2022-04-051-3/+3
| | | | | | | | | | | | | | | | To ensure that both Linux and Windows host builds are equivalent the Linux host builds need to use the common QNX SDP file that support both host environments. This new QNX SDP does not include QNX license files like previously, instead they are separately installed by the Ansible scripts of the CI system to the $HOME/.qnx directory. That directory is also supposed to be used for any possible binaries found via PATH environment variable. Task-number: QTBUG-101292 Change-Id: I97ad71f00e8289e708c51565f86c6d0c84a9ae84 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> (cherry picked from commit e506c84eb214c95a1c1aab9a4043a39ef2087782) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSplitter: Don't move handle in non-pressed stateNodir Temirkhodjaev2022-04-052-10/+34
| | | | | | | | Fixes: QTBUG-102249 Change-Id: Ib1d74447e346760d1fc9960e11486e8dc7ea3bc0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 99f22e3fc8caefcad810804da1a64446fb457337) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: add Windows host support for QNXTommi Mänttäri2022-04-051-7/+41
| | | | | | | | | | | Add required environment variable configurations to COIN for building Qt SW in Windows host for QNX OS. Task-number: QTBUG-101292 Change-Id: I3ea4cbaaebb693a0a46b5f9cbd08209805366ca7 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> (cherry picked from commit aa8bada10b866305ee3e5a082c943e1d05785382) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmake: Add support for C++23Joerg Bornemann2022-04-055-5/+11
| | | | | | | | | | | | | | | | Add the CONFIG value c++2b that represent the upcoming C++23 standard. Add QMAKE_CXXFLAGS_CXX2B and QMAKE_CXXFLAGS_GNUCXX2B. On MSVC, use /std:c++latest when c++2b is active. This fixes an issue with MSVC where c++latest implied the /std:c++20 compiler flag. Fixes: QTBUG-102202 Change-Id: Ie00ee5793c1a649195013c8c19efc8d59cf0acc9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit b5ed3cb7baeb6d77c375134719ee04ffcc211b9f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>