summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler warnings by marking overrides in testv6.3.0-alpha1Volker Hilsheimer2022-01-071-2/+2
| | | | | | | | | Change-Id: Iab5f121ee49c71821a2b71b20ddb36846b1bbaf7 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 13ca705b48c5661a6d3b445a5f20c57c9fff9c38) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: fix const iterator APIMarc Mutz2022-01-071-8/+8
| | | | | | | | | Iterators model pointer, so const must be shallow. Change-Id: I90494c98762f1494efcca4965ee739540333f5d7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit a5b158ed6dd5e393eab78f4034a93ac1250850e3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: fix mixed rvalue/lvalue insert overloadsMarc Mutz2022-01-072-2/+39
| | | | | | | | | They never worked. Change-Id: I9a15c848416419823f28ea580248fbe93a4365dd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit e6cd1eb0791bde5d61e6c4aa2275bc7050e0c1d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused legacy files from QLabel unit testAxel Spoerl2022-01-0765-0/+0
| | | | | | | Change-Id: Ibd4ec0bc987d52877154ff2fd0d43e583f08455b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b4e15c9b30bb05918fb43b76763254b49e6d3c30) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QIcoImageFormat: move the test behind a feature flagJanne Juntunen2022-01-071-1/+3
| | | | | | | | | | | | Do not build and run tst_QIcoImageFormat when QT_FEATURE_ico is disabled. This test was failing on webOS since there is no imageformatplugin for .ico when the feature is disabled. Fixes: QTBUG-99633 Change-Id: I410b351f773639c0c29e09d4d0b5bc6da13df1d9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 60c22f05e9d37744d65dc51a752a1cf2aa0a383b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Properly wait for the Android emulator to fully bootDimitrios Apostolou2022-01-072-36/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It had been noticed that sometimes the Android emulator in our CI took several minutes to fully boot. It turns out that this behavior can be reproduced locally by removing the image files under $HOME/.android especially the "userdata-qemu.img.qcow2" file. Then the emulator goes through several reboots until fully booted with a full set of packages installed. We discovered that the property that signifies it is finished is dev.bootcomplete=1. So we now check for this flag and remove the other heuristics we had. We also disable the debug output to avoid hundreds lines of logs. Instead we selectively print the values that the emulator returns, every second until full boot is detected. We increase the Coin timeout for the shell script, from 5min to 10min, since it has been measured that it takes about 2.5min on a good day, and the script itself retries several times to restart the emulator in case of failure. Finally we adjust the coding style a bit to be more consistent. Fixes: QTQAINFRA-4681 Change-Id: I77062dceb91477e957696c89bfacb4ebabc34c1f Reviewed-by: Toni Saario <toni.saario@qt.io> Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 98f1034f96edbd7e7e88a513f8549259fd07c35b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix typo in \externalpage commandTopi Reinio2022-01-071-1/+1
| | | | | | | Change-Id: I7a2dd1057dae5424f27da314e56dbfad6e34e438 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 869f14fb3586fb428c28c65f916b4680f3ec23ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix WrapOpenSSL packageJoerg Bornemann2022-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Since f19ce3898e0257dac1112754b1a84c24486bda01 we link OpenSSL to QTlsBackendOpenSSLPlugin instead of QtNetwork itself. In dependent Qt repositories this leads to the following situation: QTlsBackendOpenSSLPlugin's dependencies call find_dependency(WrapOpenSSLHeaders), and OpenSSL_FOUND is set to ON in that scope. Later, we call find_package(WrapOpenSSL) in a different scope. find_package(WrapOpenSSLHeaders) bails out early, because the target WrapOpenSSLHeaders::WrapOpenSSLHeaders exists. find_package(OpenSSL) is not called again. The check for OpenSSL_FOUND fails, because the variable is not visible in the scope of FindWrapOpenSSL.cmake, and we don't create the WrapOpenSSL::WrapOpenSSL target. Fix this by checking for the existence of the target OpenSSL::SSL instead of the OpenSSL_FOUND variable. Fixes: QTBUG-99623 Change-Id: Idd0e8a60fabd0c7772413d557442c0012b0b436c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit faa26be44cd7306c8ec2276131414866d3de712d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qtouchevent: remove two QMutableEventPoint::from() usesMarc Mutz2022-01-071-2/+2
| | | | | | | | | | The input is already a QMutableEventPoint. Task-number: QTBUG-99615 Change-Id: I82b3e83ffa5b87c9a562cb3bb1d7bad0a0cd5245 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 521fea91690174ddd6340fc6f82554613854b017) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGuiApplication: remove a use of QMutableEventPointMarc Mutz2022-01-071-1/+1
| | | | | | | | | | | The 'persistentPoint' reference is never used as a QMutableEventPoint, so don't cast to it (which is UB). Task-number: QTBUG-99615 Change-Id: I7fdfb2427a09d691242bf1fa28e202ba326ea678 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit d2055fcee5a7f2ee83bd7b67da8b0b325f9504c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Handle momentum scroll NSEventPhaseBegan when scroll had endedTor Arne Vestbø2022-01-071-1/+5
| | | | | | | | | | | | | | | | | We use nextEventMatchingMask to look for future momentum scroll events when the non-momentum scroll ends, to continue the scroll uninterrupted from the perspective of client code. But we're not guaranteed to find a future momentum scroll event, as observed on macOS 12.1, so if we then see a momentum NSEventPhaseBegan we need to treat it as a scroll begin from Qt's perspective. Fixes: QTBUG-97841 Change-Id: I412abe0891660eda32a42a08d7dc7dee9eaa73aa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 2e1191845679b937bed5f04979287c26e5578e76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update external links to Qt Creator ManualLeena Miettinen2022-01-071-205/+51
| | | | | | | | | | | | | | | Sync with Qt Creator Manual 6.0.0. Remove topics related to using Qt Quick Designer plugin because they are now in the Qt Design Studio Manual, only. Add new topics and fix some topic titles. Some topics also exist in Qt Design Studio Manual and can be accessed with the "Qt Design Studio:" prefix. Change-Id: Ie4f07b0a1602f3318ca5335ee72130ddce12801e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit c68b057510b59ee369f0d3255822d841d6d4a7fd) Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QHighDpiScaling: fix typo in docYuhang Zhao2022-01-071-1/+1
| | | | | | | Change-Id: I7f874e85484a6ab4be0280e736b57141bdebc656 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 00d197662d29f4d84a5087e560f152266a759863) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFontDatabase: remove outdated commentsYuhang Zhao2022-01-072-6/+0
| | | | | | | | | | | | | | | QtBase/2526df506bda99f9497e83a4e6820557a722660e has resolved what the comment said. As a drive-by, remove the unused QSystemLibrary include, which is forgotten in 2526df506bda99f9497e83a4e6820557a722660e. Amends commit 2526df506bda99f9497e83a4e6820557a722660e Change-Id: Iab5c7d00e22d306be63d7588ea44bf73d377793d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 44cd0c6c5fd1c025f4aae1247223277c48d031ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist quitOnLastWindowClosedWithEventLoopLocker on B2QtTor Arne Vestbø2022-01-061-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: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Wait for boot to be fully complete with all packages installedDimitrios Apostolou2022-01-061-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | It happens that the android emulator supposedly "finishes" booting and getprop shows bootanim=stopped and boot_completed=1. But sometimes not all packages have been installed (`pm list packages` shows only 16 packages installed). After around half a minute the boot animation starts spinning (bootanim=running) again despite boot_completed=1 all the time. After some minutes the boot animation stops again and the list of packages contains 80 packages, among which is also the "development" package. Only then is the device ready for `adb install` of custom packages. This should be the last time we see the message: Error: Could not access the Package Manager. Is the system running? Just for completeness, we also properly disown the emulator process and its file descriptors, since the parent shell dies but the process stays. Fixes: QTQAINFRA-4681 Change-Id: I2b9d4bdc3dac0f10d09d4f09c83b4028ebc31f48 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> (cherry picked from commit c8e0a742fb316cf266ec6d56b9b702f07557e2e4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Do not hide android emulator outputDimitrios Apostolou2022-01-061-1/+4
| | | | | | | | | | | | | | It might print useful messages, even though they might come mixed with other test messages. However we can't leave stdout/stderr as is, because Coin agent hangs at the end of the shell script, waiting for them to close. So we just redirect them to a file. Change-Id: I797af78786b7df31131b3c3261e1c1fc00e5d460 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> (cherry picked from commit 8bf1beb9bd4281626eb6740a69ccb7cb70e56ae7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Wait for android emulator to be up and running properlyDimitrios Apostolou2022-01-061-11/+41
| | | | | | | | Fixes: QTQAINFRA-4681 Change-Id: Icfa75b6982964970172726379e5a2a2bb640f8bf Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> (cherry picked from commit 0aaf51404272e0b16d0e670d469ece0730412c35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: gl: Do not just rely on GL_COMPRESSED_TEXTURE_FORMATSLaszlo Agocs2022-01-064-57/+115
| | | | | | | | Task-number: QTBUG-98937 Change-Id: I64f2783ae64ad3ef77a389999ded4c9ba2c46ee5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 0d98a1faf7fa0b943c7513b8ef56c4e9db007b4b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SQLite: Update SQLite to v3.37.0Andy Shaw2022-01-062-6391/+8448
| | | | | | | | | [ChangeLog][QtSQL][SQLite] Updated SQLite to v3.37.0 Change-Id: I5b6ec6f7a3c4be551ce73d46557e43bbce657854 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c20b213eabd8138f8566c7a1fd0633625c47b520) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMacStyle: use the 'momentary push in' type for push buttonsTimur Pocheptsov2022-01-061-8/+22
| | | | | | | | | | | | | | | | | In the past, we were using different hacks to emulate the 'default' button and a normal button (and them in a pressed/not pressed active/non-active states). In macOS 12 old trick stopped working and UI looks a bit different: non-default buttons never get accent color even if pressed. Instead of relying on a combination of 'push on-push off' type's states and highlight, we can use the 'momentary push in' (highlighted == YES gives an impression of a pressed button) + setting a key equivalent (thanks to Tor Arne for the hint) gives the desired 'default button' look. Task-number: QTBUG-98483 Change-Id: If7d665d217420b7732b556d98d9e0313258ff93e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit eabaa8a08e647273978f5786729776213e326aca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Implement QTest::qWait() in terms of QTest::qWaitFor()"Michal Klocek2022-01-061-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5c908c826313143a65ef7e95e5af6625fe1ba813. git-bisect points to this commit as the cause for serious test regressions in the qtwebengine module where test time execution goes up 10 times (at least for debug builds), causing timeouts. The reason for the time regression in test execution is caused as the 'processEvents' call is no longer executed with 'remaining' time: QCoreApplication::processEvents(QEventLoop::AllEvents, remaining) 'processEvents' do not spin for the whole duration and instead it calls 'predicate' after all event processing but before proceeding with new events. This introduces significant Chromium's message pump lag and makes test execution much slower. In case of relanding this change we need to go through all tests and extend timeouts, which is not feasible at the moment. This is a quick-fix for 6.3. Pick-to: dev Change-Id: I90696479bfb9f0a0b8a8acc5bb7e7058b7d0c462 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: link OpenSSL to openssl tls backend instead of QtNetworkFrank Su2022-01-062-16/+11
| | | | | | | | | | | | | | TLS backend has become plugins since Qt 6.2. QtNetwork does not need these links anymore. Also removes unnecessary condition since openssl tls backend is enabled only if OpenSSL is enabled. Change-Id: I4cc0422531d567ad015f9648fbb2bcd51f634cb9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit f19ce3898e0257dac1112754b1a84c24486bda01) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTzTimeZonePrivate: use ctor delegation instead of init()Marc Mutz2022-01-062-9/+9
| | | | | | | | | | | | | | | This makes it obvious that the code in init() is only called from the constructor and its m_icu handling doesn't need mutex protection (to be added in a subsequent commit). Since the input to the ctor is the result of a virtual function, factor said virtual into a static function and call that instead. Change-Id: I7c49f2e865201a2ce2b2d86b19dae29c6d337e0e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit abe802cd00bb28e95c63d318b0360db6fbf51666) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: don’t exit on clean return from main()Morten Johan Sørvig2022-01-061-0/+6
| | | | | | | | | | | | | | | | Qt 6 uses Emcripten’s default of not exiting the runtime when main() exits. Make qtloader not transition to the “Exited” state when main() exits with code 0, since this would hide the app canvas. (The app state tracking code in qtloader is by now outdated, and should be revisited.) Change-Id: Ib47898f1dd93d87b2675f20cd39f96ac3cb681a7 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 08ea8aaa8b5f0086819ce43c16acff3a45c6e450) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: add secondary thread exec manual testMorten Johan Sørvig2022-01-065-0/+132
| | | | | | | Change-Id: Id16cddd703682d325d77ad597996960a8f521d1c Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 9b096e8cb8e181ed6579e0fa34b23418d8a3be1a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTzTimeZonePrivate: fix permanently-detaching m_icuMarc Mutz2022-01-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The m_icu member is a mutable QSharedDataPointer, which means that only the non-const API subset is accessible, and so any access to it will always detach, in 5.15 even a check like if (m_icu), which the code luckily doesn't use (Qt 6 added a operator bool() const). We don't need detaching behavior here, though, since, once set, m_icu is never changed. So just use a QExplicitlySharedDataPointer instead, and never call detach() (which would do the wrong thing). Just in case someone does add a detach() later, instantiate QExplicitlySharedDataPointer over QIcuTimeZonePrivate directly. This requires making displayName() overloads from QTimeZonePrivate visible in QIcuTimeZonePrivate. Add an assertion that QIcuTimeZonePrivate is final, with instructions on what to do if it fails. Finally, hold a pointer-to-const to avoid race conditions in the pointee. The code still contains a data race, due to the lazy initialization of m_icu, but now we have at least a fighting change to fix it. Change-Id: I32c343822dac43f96d9fbc4c759fa44138861eae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 23aa51991dee2864d7f1d1acee953fd5c7b409fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFutureCallOutInterface: de-inline dtorMarc Mutz2022-01-062-1/+3
| | | | | | | | Task-number: QTBUG-45582 Change-Id: I5f3411e1dcea4b76fb0e729f612516db3163c93a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 2dea20e4b075f2367a069793ece2327eff5ac4bd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QGraphicsView: fix memleakMarc Mutz2022-01-061-4/+4
| | | | | | | | | | | Found by asan. Amends 01aeb5f7e4fd977e9698fffdc7650897664ecb82. Change-Id: Id61fc1bc1f40494371ac27cb258a22c89db24683 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b385632ea69b93a3463228eb985f6e5d7d0a98d3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: always use requestAnimationFrame for updatesMorten Johan Sørvig2022-01-065-65/+116
| | | | | | | | | | | | | | | | | | | | | | The compositor was posting update events and flushing/redrawing using a zero-timer. Change this to use the request_animation_frame API from Emscripten, which makes sure we flush window content at the next native paint event. This has the additional benefit that hidden canvases (e.g on hidden tabs) won’t get frame events, and then stop painting. We support both well-behaved QWindows, where the window calls requestUpate() and then paints/flushes on the following deliverUpdateRequest(), and also less well behaved windows which paints at any point during event processing. Change-Id: I747d6f7ace86ceddaa18ab86b6a0ee833f98991b Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit eb62b6ac02b86f11bc6bcbe1f37df003d2a46d02) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGlobalStatic: invert the order of destruction and setting the guardThiago Macieira2022-01-061-2/+2
| | | | | | | | | | | | | | | | | This is how the old implementation did it: the Type member was a member of Holder, but the guard was set to Destroyed in the HolderBase destructor, which ran after. I find the way I implemented in commit81a31beeb25eaf14d5c5f42fe26aa49d6ef29bf8 to be more natural, but it caused regressions at runtime for code that attempted to reenter the global static on destruction. Not unit-tested because I don't know if we want to keep this forever. Fixes: QTBUG-99192 Change-Id: Ib42b3adc93bf4d43bd55fffd16c09d7f835d121e Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit e3e2674100b1ecbad7117f15c7aa13a704a7d34e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add link targets for Qt Design Studio Manual topicsLeena Miettinen2022-01-051-0/+709
| | | | | | | | | | | You can use these link targets in Qt docs to refer to QDS topics. Change-Id: I4d4e288e1456ef92c5e8d9949390a431220eab75 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 25406a652670da56f4caa14899eb81085ba0b93b) Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Update copyright year to 2022Kai Köhne2022-01-059-9/+9
| | | | | | | | Change-Id: If6f1d6f9f82a601f8e2b6d36650d6e737518aa60 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 6205cb161d393f96c670d57bca29fed2dcfda14c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractAnimation: add missing forward-declarationMarc Mutz2022-01-051-0/+1
| | | | | | | | | | | | | | | QUnifiedTimer is declared as a friend using an unqualified name that hasn't been forward-declared before. In this situation, the friend declaration declares the name. This is subtle, and while it's ok here, in other situations it can actually lead to two different names being declared. Fix by adding the missing forward declaration. Change-Id: Ie9f5165578f1d88c6bee1afa23ef43847755a0eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 85c31d976fd4ea611f03b18372f57130c16f9c34) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qanimationgroup: fix memleaksMarc Mutz2022-01-051-2/+4
| | | | | | | | | Silences asan. Change-Id: I4995d9a6f0d4bb617fbb82b68289f7ad1ec0e96b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 682831a00c93480e5f04f8d8d706f9791fa50dfd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QItemModel: fix memleaksMarc Mutz2022-01-051-3/+3
| | | | | | | | | | | | When creating proxied models, make the source model a QObject child of the proxy model, so the source isn't leaked when the proxy is deleted. This drove asan nuts. Change-Id: I0f7fc9ab8e99d030c941cfb336ee4e2323b362ae Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 9f713e8d25c330cc9ab598755b81b9881df830e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QArrayDataOps: remove unused header <algorithm>Marc Mutz2022-01-051-1/+1
| | | | | | | | | | | | | The header only uses std::destroy(), which is in <memory>, not <algorithm>. Doesn't change anything, because <algorithm> is still transitively included via qcontainertools_impl.h. Change-Id: Ib6a94ea56d5819f916c80a2e307c99b328f3d61d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 91e210137c626fa89f86d979fa0a866531369a37) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QRandom: remove dead pre-C++11 codeMarc Mutz2022-01-051-6/+0
| | | | | | | | | | | | | All compilers support C++11 unrestricted unions in Qt 6. Gets rid of another instance of to-be-deprecated-in-C++-23 std::aligned_storage. Task-number: QTBUG-99122 Change-Id: I5e6dc025893c79d0c516fc2d3801ec071615b9cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b8431bef376cc226a51f10cab96c6c672ea1b519) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QPointerEvent: de-inline point(i)Marc Mutz2022-01-052-3/+5
| | | | | | | | | | | | | | | | | | | | | | | This function contributed 1.2s of the total 361s (0.34%) to KDDockWidgets compilation time, according to a trace generated by Sergio Martins: **** Time summary: Compilation (146 times): Parsing (frontend): 343.2 s Codegen & opts (backend): 18.1 s **** Templates that took longest to instantiate: [...] 1228 ms: QList<QEventPoint>::operator[] (59 times, avg 20 ms) 1213 ms: QList<QEventPoint>::detach (59 times, avg 20 ms) 1209 ms: QArrayDataPointer<QEventPoint>::detach (59 times, avg 20 ms) 1202 ms: QArrayDataPointer<QEventPoint>::reallocateAndGrow (59 times, avg 20 ms) Task-number: QTBUG-97601 Change-Id: I5f4ff9843f7deff9f390c465df28cba3391e048b Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 36709d7dd59435d34a5192bef14f5e239d3886f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use IS_SYMLINK condition instead of REALPATH when checking BINARY_DIRAlexey Edelev2022-01-041-12/+16
| | | | | | | | | | | | | | | For case-insensitive file systems, the REALPATH file component may return file paths in a different case than ABSOULEPATH. We use REALPATH to detect symlinks. In case-sensitive file systems there still might be the situation when /path/to/Build is a symlink to the /path/to/build, so we cannot make the comparison case-insensitive. Use the IS_SYMLINK check instead. Fixes: QTBUG-99416 Change-Id: Idf998b9e09837a834139553fb822e05b2a0a1949 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit dcc2704d17bda08e6dc7783559ccbfd864dd4339) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Collect the apk dependencies regardless of targetAlexey Edelev2022-01-042-32/+71
| | | | | | | | | | | | | | | | | | | | | _qt_internal_collect_target_apk_dependencies function is common for all targets, but its signature was telling that it's target-specific. This also causes an issue when we had more than one target in tree that produce apk, since only first target got the property after respective finalizer was executed. This change generalize the function and uses _qt_internal_apk_dependencies target to store the extra library directories from the build tree. _qt_internal_add_android_deployment_list_property signature is also changed to support reading values from multiple lists of multiple targets. Amends d20f4ae706559fb7de8db9dd4845f7ce3936061a Change-Id: I5b40fa96a0eb73348c0029e2b13c63a9465cb520 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 585f46c811353cf7e940fa8a9ff08315af0004ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Pass QT_BUILD_STANDALONE_TESTS to Android external project if definedAlexey Edelev2022-01-041-0/+8
| | | | | | | | | | | | | | | If we configure qtbase standalone tests for multiple Android ABIs, external project also needs the QT_BUILD_STANDALONE_TESTS flag enabled to avoid configuring the whole qtbase but not only tests. TODO: Need to forward all cache variables that are defined by user to the external project since otherwise the configuration of the external project will differ. Created QTBUG-99537 to track this. Change-Id: I3aec1391c850fb37696dc50416e0ff2a2646e759 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 18e62ed3b73849ea985f592fea10255de8bd440c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update internal function signaturesAlexey Edelev2022-01-041-20/+20
| | | | | | | | | | | | Update _qt_internal_add_android_deployment_multi_value_property and _qt_internal_add_android_deployment_property signatures to match the _qt_internal_add_android_deployment_list_property signature. Change-Id: Ie4fb2ebe96c783222fc4b56c3186e22b96cbbb95 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 2cb50b9fef383565003731370037f9a507ae2fef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build of multiple apks in a single project treeAlexey Edelev2022-01-041-1/+1
| | | | | | | | | | | | | | | | | | | ExternalProject_Add_Step adds the step timestamp file as the dependency to a '-complete' file generated by add_custom_command that is run inside the ExternalProject_Add function. Since the '-complete' file path is computed using CMAKE_CURRENT_BINARY_DIR we run into the issue if ExternalProject_Add and ExternalProject_Add_Step are run from the different source directories and have the different default binary directories as well. This change suppresses the behavior by adding the 'EXCLUDE_FROM_MAIN TRUE' flag. We may do this since the target related to the step is added to the dependency chain of executable target and the chain of external project is not used for now. Change-Id: I7203261b61cfa56bcd9e49ac3e8d7ecb217a5a6c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d62463305d6a0471e5f234ce04303cb302725a7a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* [doc] QCoreApplication::installTranslator() doesn't take ownershipMarc Mutz2022-01-041-0/+2
| | | | | | | | | Document it. Change-Id: I25d305945bf29348d6ea5756fbf80c418f812d0f Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 66a79287f159d236090fd0092a81be133862bbdc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add baseline test for text renderingVolker Hilsheimer2022-01-045-0/+147
| | | | | | | | | | | Data-driven test case that renders the HTML files into an 800x600 image for baseline comparison. Task-number: QTBUG-99148 Change-Id: I9ccc0cd21a1e94ff68d23bb82b84e1da46d6335a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit be8792d4fe6b1843068f1a115b96c74c80aefe3a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Exclude sources from HEADER_MODULE if cmake version is less than 3.19Alexey Edelev2022-01-041-3/+12
| | | | | | | | | | | | | | CMake versions less than 3.19 don't support adding the source files to the PRIVATE scope of the INTERFACE libraries. It looks like these PRIVATE sources are only used by IDEs to display them in a project tree. Skip them to avoid configuring issues. Fixes: QTBUG-99316 Change-Id: Id03f540ac9c94e920adfae5de4f364bd7aba4613 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 8e2f101a6bf6c59e707b2747d6df76e8e221e319) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace ANDROID_ABI argument with the QT_ANDROID_ABI target propertyAlexey Edelev2022-01-044-104/+122
| | | | | | | | | | | | | | | | | | | | | | | This change tries to make the API more user friendly and prevent wrong use of multi-abi API. ANDROID_ABI argument of qt6_add_executable was position-depend and needed to be placed after the executable 'sources'. Using the target property we solve this problem and provide more consistent and common way to enable multi-abi build for the single target. This meanwhile also requires to execute multi-abi build configuration in the finalizer, since the property might be set at any point. Also the priority of the QT_ANDROID_ABI target property now is higher than the priority of the QT_ANDROID_BUILD_ALL_ABIS variable. So target will only build packages with the ABIs specified in QT_ANDROID_ABI property if both are set. Task-number: QTBUG-88841 Change-Id: I3515297ed267974498913c59619433dc234ec217 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit f90221d8cd2fdc8d4bf2105f0821ee30395443c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove faulty #include from widgets baseline testEirik Aavitsland2022-01-041-2/+0
| | | | | | | | | | | Since there is an actual qwidgetbaselinetest.h header file, one should not include a .moc file. The build system will take care of it, and currently warns about this #include. Change-Id: I4fbff9ef75c901fe3db4df54d6f3ff0d9307edce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 0f051815a0ede28280b9d98a2f74bfc47e7fec6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qtranslator: fix memleakMarc Mutz2022-01-031-3/+3
| | | | | | | | | | | QCoreApplication::installTranslator() does not take ownership of the QTranslator. The QTranslator dtor removes itself from QCoreApplication again. Change-Id: I17eb7ab350631eb32fe76af29d9a576a0efa05d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit ab2439080432b5d637f3c22d4a0767cc842079d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>