summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix misguided winding backwards past start of start of MS TZ datav6.3.0-beta1Edward Welbourne2022-01-301-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | QWinTimeZonePrivate::data()'s search for a rule applicable to a given time, in the first year whose milliseconds qint64 can represent, tries to look at the preceding year to get start-of-year data, which leads to misleading results. It does so to determine whether to use a rule's standard or daylight-saving details, but this year is long before the invention of daylight-saving time, so we can bypass the whole mess. Unfortunately, MS's data does pretend (in some zones) that DST has always been in effect, so cutting off that claim at some historical point will actually get better results for before the cut-off than for the period after it, until the relevant zone actually adopted DST. Conservatively put the cut-off at 1900, before any actual zone used DST, albeit after the idea was originally floated. This fixes a failure found by some QDate::{start,end}OfDay() tests that I want to introduce. Task-number: QTBUG-99747 Change-Id: I15cf9dd092b946191e8863c7e85fbeb4ba6c106d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 9a83706046406f233ea6f93a2f90fd5b05916ee9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: fix is_transparent detectionMarc Mutz2022-01-302-3/+26
| | | | | | | | | | | | | | | Add a level of indirection via void_t such that struct is_transparent {}; works, and not just using is_transparent = <unspecified>; Change-Id: I3ca2af6a07e6989dc95abc10fb2d0078a5269e5b Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 58e8ae5605abefd0f579586a890dc13fb381b2a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: remove binary_find()Marc Mutz2022-01-301-50/+28
| | | | | | | | | | | | The private binary_find() overload set is literally identical to the public find() one, so cut out the middle man. One less level of function templates to compile. Change-Id: Ia7b248d883b7bcff39c4f7b470d2567970572885 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 2b617a29dca373b641e4dd19b78080fe9be47572) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QVersionNumber: remove the "pure" attribute from commonPrefix()Thiago Macieira2022-01-301-1/+1
| | | | | | | | | This function can allocate memory, so it's not pure. Change-Id: I6fcda969a9e9427198bffffd16ce7fcff3ae021d Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 671035035a6f1846c05e052e4e745d5cb2b41306) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qsimd/x86: disable the F16C, FMA, and VAES features if AVX is disabledThiago Macieira2022-01-302-5/+5
| | | | | | | | | | | | | | | | Those three features can't be used without the VEX prefix, which requires that the OS has enabled saving of the AVX state on context switches (i.e., use XSAVE). The list is automatically maintained by the updated script in OpenDCDiag[1]. I need to update the copy in util/x86simdgen. [1] https://github.com/opendcdiag/opendcdiag/blob/main/framework/scripts/x86simd_generate.pl Change-Id: I6fcda969a9e9427198bffffd16ce55193a6cb069 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit cdb78d79935cb3d1063601223548465bc09b26d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qfloat16: add missing staticThiago Macieira2022-01-301-2/+2
| | | | | | | | | | | | | Commit 0df7831d01b03910ae74a432c2a07a29d99fc315 moved these functions into this file, but forgot to add the marker. Drive-by replace Q_DECL_NOEXCEPT with noexcept Change-Id: I6fcda969a9e9427198bffffd16ce5543c5fd544e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 073454901de1b66795b29a708ac939026ea2f41d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix finding GSSAPIAllan Sandfeld Jensen2022-01-301-2/+5
| | | | | | | | | | The package is called mit-krb5-gssapi on Ubuntu, and the LIBDIR variable was missing an underscore. Change-Id: I85b5603c1161f33462aa71bbd522d40dd7489405 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7e591453be37caf4d8e2bcb7ebc6b706b84f50be) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: add full is_transparent support [3/3]: add overloadsMarc Mutz2022-01-302-1/+76
| | | | | | | | | | | | Now add the missing overloads for mixed-type lookups, supported by is_transparent Compare objects. Change-Id: Ib588b6a4f733d5d9908c8c7d7c209df6e7bd6674 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 64bc6509c350c5750c6432a0ae6876f4bfb97cd0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_qfloat16 run time error for INTEGRITY (tested on sa8115)Tatiana Borisova2022-01-301-0/+5
| | | | | | | | | | | | - Bounds::has_denorm returns denorm_indeterminate. It is expected behavior for GHS compiler. Task-number: QTBUG-99123 Change-Id: I8402c541093a73623b6dc507012d98e565789cff Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit d336fdd393a8a97fbcb00837763b45602d346d34) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: add full is_transparent support [2/3]: shuffle functionsMarc Mutz2022-01-301-23/+19
| | | | | | | | | | | | Move the do_{remove,take}() functions into the private section, cleaning up after the previous step. Change-Id: I3325336458b34e7f376b42bfe68355d93ff4ce70 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9bfc8f348d39a3606847e2bc2e070bf7cdccc99e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QCalendar: eradicate Java-style iteratorMarc Mutz2022-01-291-4/+9
| | | | | | | | | | | | | | We had QT_NO_JAVA_STYLE_ITERATORS in .qmake.conf, but it was lost in the transition from QMake to CMake, and - plop - they start trickling in again. Change-Id: Ib92937e5fe510aba2aad92809f7a6d5fbae6f3a0 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 55a88206f3114eb13c9b1a26279a31a1838bbd94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QCalendar: replace ostream-style qWarning with printf-style oneMarc Mutz2022-01-291-3/+2
| | | | | | | | | Saves the <qdebug.h> include and expands to a lot less code. Change-Id: Ic1a0aa707e7c0d4bd54da45a7fcafbf898681b2d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 37714d255b1760e3a40b0de914ed455c81fbb489) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: add full is_transparent support [1/3]: split functionsMarc Mutz2022-01-291-2/+14
| | | | | | | | | | | | | | | | | | | Extract Methods do_foo(iterator) from their respective foo(Key) methods. This is done in order to separate the common code from the code that will differ in the is_transparent overloads. Leave the function bodies where they previously appeared, for easier reviewing. Change-Id: I49f41f9121a047df696f39daeaa0a9da6a16dddb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 7b7c3355f2a2bd7bb7fdbe8ad343b8524901af71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: implement mutable op[] via try_emplace()Marc Mutz2022-01-291-12/+2
| | | | | | | | | | De-duplicates code. Change-Id: Id7841a0717cd66bd56d489e6d2630e9eeb284316 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit f08f28548ae04f89bd7fd24673c1369c96786e3d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: use erase() in remove()Marc Mutz2022-01-291-2/+1
| | | | | | | | | | | De-duplicates code. Change-Id: I95d3d6f57c2f3716b8f3f549d1cc2a02cde9e996 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d030606a5a6c9c30972892f94ac656e983183349) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: replace manual const_cast<>s with std::as_constMarc Mutz2022-01-291-9/+7
| | | | | | | | | | | | | | | Shorter, because it doesn't need to name the type. As a drive-by, replace all remaining uses of the private full_map_t alias with 'QFlatMap', the class name, which, also in templates, refers to the class, not the class template. Change-Id: Ie3bada43d9d28a84543e8baa8a36c522dff80b9e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 1cb192bf3da88c97e7622d4813053a4ca916044e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLocale: replace a QList with QVLA for duplicate trackingMarc Mutz2022-01-291-1/+2
| | | | | | | | | | | | An alternative would have been QDuplicateTracker, but the maximum number of entries in the tracker is statically limited to six, so we don't need a fancy hash table, linear scan is good enough. Change-Id: I8ca97d239723b51892cb13a43b1d1a6412faa561 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 096e8b5f65c1cb5c5c0a14d46fcb232471401645) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QEvent: initialize the static userEventTypeRegistry constexprlyThiago Macieira2022-01-291-1/+3
| | | | | | | | | The {} is the difference. Change-Id: I6fcda969a9e9427198bffffd16ce8dabd213393e Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit c05ee60a2ffff2c357e9840b0851d9f7d10e656f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QString: optimize finding size=1 needles in QLatin1StringsMarc Mutz2022-01-291-0/+13
| | | | | | | | | | | | | | Use memchr() if the needle has size() one, and add a fast path in findString(QLatin1String, QStringView) to circumvent the QVLA path. We might want to extend this and use a simple C array for very short needles and (cached?) Boyer-Moore for anything larger. Change-Id: I8364ea9f004d537be8a09cc751408d8adb902d13 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 82147ce33a31e491c8363b78b50fbb9b1a2619de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Let QXcbGlxWindow::createVisual fallback to QXcbWindow::createVisualIlya Fedin2022-01-281-3/+6
| | | | | | | | | | | | | | | When flatpak refused to install org.freedesktop.Platform.GL.default for me, I got into a situation without GL drivers and Qt applications stopped getting transparency windows. They fallback to use root_visual and it doesn't provide sufaces with alpha, I tried to add fallback to QXcbWindow::createVisual just like QXcbEglWindow::createVisual does and voila, they got transparency. Change-Id: I9f401643b3ef231048c6e9e250121c96514101f5 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit d13ee2dc1a151ec7918ac900cf17a76978dd28f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android A11Y: fix content update notification when object is hiddenIvan Solovev2022-01-281-1/+4
| | | | | | | | | | | | When the object is hidden, we should not use its viewId to notify content changed. Instead, we need to use its parent id. Task-number: QTBUG-95764 Change-Id: I608658e21c401d76459a09e4b274c60b849ace86 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 850a7f1238e84b6960a84e12687e40cf939a44d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: explicitly remove accessibility focus when element is hiddenIvan Solovev2022-01-281-0/+11
| | | | | | | | | | | | | | | | | | | Before this patch when an element that had an Accessibility focus was hidden (for example, a button because of Accessibility.onPressAction), the focus was still remaining on that hidden element. So the next doubletaps on the screen caused the Accessibility.onPressAction() of the hidden element to be executed again and again. To fix this, we have to explicitly send a FOCUS_CLEARED event to the Android OS, when the object is hidden. Another needed fix is to set the m_focusedVirtualViewId in notifyObjectFocus() properly. Fixes: QTBUG-93393 Change-Id: I6ff8a19868b96842719924037545c4ecc91e0dad Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit f6ddb3e921e39cf165fcc184e30bd16d5311c575) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* [Android]: Handle the screen name, modes and refreshRate properlyBogDan Vatra2022-01-289-97/+154
| | | | | | | | | | Fixes: QTBUG-87136 Fixes: QTBUG-93823 Fixes: QTBUG-94959 Change-Id: Id480e22611ec949b5e3ee780fc695fb502a5950c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit c1a93b20ff1fec370b2483276b74f07eb54486ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Exclude tst_selftests when feature process is disabledTatiana Borisova2022-01-282-8/+2
| | | | | | | | | | | - It should not be built for systems without process feature. Task-number: QTBUG-99123 Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e76d27d3ed2475169166a8666a3d90a82444fdbf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QSharedMemory from the bootstrap libraryJoerg Bornemann2022-01-271-5/+0
| | | | | | | | | | It's not used by any bootstrapped tool anymore. Fixes: QTBUG-100074 Change-Id: I92cf441c200174e73b483cb4f08bab6c3e7d9c09 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 75082c9f20271eb7916a7e8e85d2e58b8e4b1392) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move private QOperatingSystemVersion::compare to removed_apiMårten Nordheim2022-01-273-6/+10
| | | | | | | | | From the API review. Change-Id: I9877990f75189b99a372ea6342d07a7031228ac7 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c781d5ed080f3f525ed4ea3728b40967b6d397ad)
* INTEGRITY: Prevent deletion of virtual functionsKimmo Ollila2022-01-271-2/+2
| | | | | | | | | | | | | | | | In release builds -olink also enables deletion of (unused) virtual functions. In some cases this can lead to application crashes when using loaders combined with timers. Prevent this by adding -no_uvfd option to release build flags. Task-number: QTBUG-99506 Change-Id: I5c669e1e987f1fe912c9aca52ff82000125eed53 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit dac76bb442c02abab63cc805734ff8041e07fd2b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix host UiTools being picked up instead of target oneAlexandru Croitor2022-01-271-0/+1
| | | | | | | | Fixes: QTBUG-100233 Change-Id: Id4b30841ba9e499f462325f882218edf407e0a00 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit c8621da85265ecec8968eb54bfaa1558474f241b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Check if 'aab' target exists when adding <target>_make_aab as dependencyAlexey Edelev2022-01-271-1/+3
| | | | | | | | | | | The global 'aab' target has its own switch QT_NO_GLOBAL_AAB_TARGET that prevents it from being created. We need to check if 'aab' target exists before adding <target>_make_aab as a dependency. Change-Id: Iea569e3b6c7dfb6d0efa60dd2001fb9de161f725 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 4ecbebebf7bfe1eaf5685abca9e068087587df03) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QCalendar: move memory allocation out of critical sectionMarc Mutz2022-01-271-1/+2
| | | | | | | | | | | | | By Amdahl's Law, provides for more scalability. This is just for backporting. The registry should really be able to perform lookups without allocating memory... Change-Id: Ifbb832a06991b9ee9a1fd6a43db567bb572fca4f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 97b465455bfd53b7ff72a6bad0b77060727cc1c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtCore: includemocsMarc Mutz2022-01-272-0/+6
| | | | | | | | | | | | | | | | This leaves moc_qnamespace.cpp in mocs_compilation.cpp. Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Change-Id: Ifdff378c74828e12ec770cb2f453dab3a880e2a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 8224fd45d03670226e1e14cb2724a53de59b386f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QString: optimize compare_helperMarc Mutz2022-01-272-7/+4
| | | | | | | | | | | | | | | | | For a long time now we have fast mixed UTF-16/UTF-8 comparisons. But no-one told this ol' relic, which still converted UTF-8 to UTF-16 for comparison. Fix by using QtPrivate::compareStrings(QSV, QU8SV), which, as the central entry point, uses the fast-path. Consequently, compare_helper can now be noexcept. Change-Id: I4cc9f07d9bc48628f1fe695e80015a9a07b79d6f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit cd3569d69adc61655d3c797f5cc764782e8bbe53) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlatMap: avoid post-(in|de)crement on iteratorsMarc Mutz2022-01-271-4/+4
| | | | | | | | | | | | | | | Generic code needs to avoid post-increment and -decrement, because they're less efficient than pre-increment and -decrement when implemented in class types as opposed to scalars (extra copy necessary). Use the common pattern of implementing post- using pre-increment. Change-Id: Ida38df04c6c6f877453e5b3a1983457cc7f63f11 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 88fd9a281a1be2563124fa67f43950edf08eb5f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qt6_standard_project_setup: Don't enable AUTORCCJoerg Bornemann2022-01-262-3/+3
| | | | | | | | | | | | We discourage using AUTORCC, so don't make it the default for our "standard project setup". Task-number: QTBUG-87643 Task-number: QTBUG-100209 Change-Id: I2715ec561266bfed5ea4ac7722ab1f1c8b982788 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7015eafa5cc18c720d48467797bc9b55530e7181) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Display CMAKE_BUILD_TYPE when including QtSetupAlexandru Croitor2022-01-261-0/+2
| | | | | | | | | | | This will show the CMAKE_BUILD_TYPE that was computed for a configured repo or standalone tests, after the logic in QtBuildInternalsExtra.cmake is executed. Change-Id: Ib8ffa2c7806a4c16385a2fcd4500f8a0f6a9aa88 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0d5dc56554988edb87cb1575220a107c8a1f9cc4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* threadedqopenglwidget example: Split out class RendererFriedemann Kleint2022-01-269-310/+441
| | | | | | | | | | | | This makes the code clearer and decouples it from the GLWidget. As a drive-by, add a global shortcut to close. Change-Id: I3469d29bc367acc17c5f8acf9d46219259b8315b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit f172b964f6d9fc8cadeb7b5efeb3f59c0f8f16f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build with clang-clYuhang Zhao2022-01-262-2/+2
| | | | | | | | | | | | | | 1. Clang-CL can't recognize "/d2FH4" and it's causing lots of warnings when compiling. So don't apply it when building with clang-cl. 2. The definition of "FS_INFORMATION_CLASS" need to be visible to clang as well. Don't know why it was excluded originally. Change-Id: I7b6e14999eea0ba1f0d73962ff03a35548f88a5a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c532a576708254e725bf87e3b4f74d29749e709a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "QLatin1String: Add overloads taking QLatin1Char"Marc Mutz2022-01-252-45/+0
| | | | | | | | | | | | | | | This reverts commit 1c164ec7f21a78025475c561a70b94d1e3dd6bb6, except for the test additions. Reason for revert: We need to optimize the implementation, not complicate the API. Found during the 6.3 API review. Change-Id: I91c3f65ed6d1fc438deb0e028d578a07c0005362 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 1f118a54f8c5518328d7492c86ed1fc9b2a6ebcd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix snippet to match actual QFileInfo behaviorKai Köhne2022-01-251-1/+1
| | | | | | | | | | The documentation was already updated in abfac029ceaf6c3199694a50, but the snippet still incorrectly suggested QFileInfo::size would report the actual size of an .lnk file on Windows. Change-Id: I03b96b2efcb713fbc4dd30fc526e1209806bf5cf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 873a8edff8921636bef6112d545d91e1b04fe6ce)
* QOperatingSystemVersion: fix #if check for macos version checkMårten Nordheim2022-01-251-1/+1
| | | | | | | | | | | | | It would check the version regardless of OS, but this macro doesn't exist on non-darwin platforms. Amends 3446313c7a5cd6005089866a7b20c9f28e132a0a Change-Id: I7bdc302c85626d410e77bea1eb7aac7fbf1cb679 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4b6064aef434baf7e382b3994f046a2f96fa7111) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix run time failure for UI autotests (INTEGRITY)Tatiana Borisova2022-01-253-14/+26
| | | | | | | | | | | | | | | | | - Add WFD resources release: It provides possibility to re-create native window on run time. It allows to run several Qt UI applications (one by one) without device reboot. - Fix crash that found during window re-creation: ~QOpenGLCompositorBacking() calls QOpenGLCompositor::instance(). But compositor is deleted for that moment. Task-number: QTBUG-99123 Change-Id: I1e6dc9a012a166d1fd6cd1c24f9d2e9a8995fc00 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit b5124d9719ff5609832e02cd2b555966a6646b8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMake: replace a Q_ASSERT() with a Q_UNREACHABLE()Marc Mutz2022-01-251-1/+2
| | | | | | | | | | | | | | | In release mode, the Q_ASSERT() is a no-op, and Clang rightfully pointed out that, in that case, the bool ok variable will be used uninitialized. Fix by using Q_UNREACHABLE(), which has an effect in both debug and release builds. Change-Id: I33480aabe1c5233d1caddf9404f475ca9fcb8eaf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit be0dc7fbb8c0c1ead7eeeb9aefea6c081beeacdc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFuture: add a missing include for qpromise.hSona Kurazyan2022-01-252-5/+9
| | | | | | | | | | | | | | QPromise is now used in qfuture_impl.h, so we need to include it. Remove qfuture.h include from qpromise.h, to avoid circular dependency. As a drive-by, simplify a type-trait: is_convertible_v<T, S> is true whenever is_same_v<T, S> is, so we don't need to instantiate both. Fixes: QTBUG-100144 Change-Id: Ic6df43d96d9d168cc44c2949e41c5e490f4c50ce Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 1daaf613dc56c5ffedefe7ca6938ae5b191f9411) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Make sure pixelSize() to a texture rt is always up to dateLaszlo Agocs2022-01-257-24/+69
| | | | | | | | | | This is an issue for QQuickWindow in practice, although it is not hit by our current tests. Change-Id: Ia73704c1af6a82b2689ce7b844d3b0eb9a17ec18 Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 406bb6ae20471cf9bba6d910256b416792c99322) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QHash: rewrite the x86 aeshash function for len >= 16Thiago Macieira2022-01-241-52/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop for 32 bytes is left unchanged, but the tail operation for 16 to 31 bytes is replaced with an overlapped load-and-scramble. This should make the operation even faster. Also updated the key creation back to something similar to what Go does. This massively improves performance as well as the bit spread. Histogram for the bits in the hash value for the testcase from QTBUG-91739: || Bit || Before || After || | 0 | 35.0300% | 50.4800% | | 1 | 42.5250% | 50.2400% | | 2 | 46.0100% | 50.0000% | | 3 | 67.5150% | 49.9400% | | 4 | 56.5150% | 50.0000% | | 5 | 51.9950% | 50.0000% | | 6 | 58.9800% | 50.1400% | | 7 | 55.9550% | 50.0000% | | 8 | 41.9850% | 49.9200% | | 9 | 69.9700% | 49.6400% | | 10 | 68.4950% | 50.0000% | | 11 | 37.4950% | 50.3000% | | 12 | 61.9950% | 49.8200% | | 13 | 53.4900% | 50.0000% | | 14 | 63.0200% | 49.9800% | | 15 | 54.9700% | 50.1000% | Task-number: QTBUG-91739 Change-Id: Icad7c1bad46a449c8e8afffd16cb7fe7ffd3584f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 2549f189951d47d7487c58c4e799bdeb487fa068)
* QHash: fix iteration of x86 AES hash code for len >= 32Thiago Macieira2022-01-251-2/+2
| | | | | | | | | | | | | | | [ChangeLog][QtCore][QHash] Fixed a bug in the qHashBits() function, which affected the hashing of QByteArray, QString (and their View classes), QLatin1String and QBitArray, which caused the hash to not include the final 32 bytes of the data source. As a result, QHash containers where the initial string was the same had a serious performance degradation on x86 CPUs with AES support. Fixes: QTBUG-91739 Change-Id: Icad7c1bad46a449c8e8afffd16cb74dd43440f6c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit b5d480d01d9f8a3cd97c614f579008ac137c9174) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QHash: improve aeshash's page detection codeThiago Macieira2022-01-251-5/+5
| | | | | | | | | | | | We don't need to test for actually crossing a page boundary. It suffices to check if we're in the upper half or the lower half of the page. In the upper half, we load ending at the end; in the lower half, we load starting at the current position. This way, it can never crash. Change-Id: Icad7c1bad46a449c8e8afffd16cb743e622b3405 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 517821b1730695dc41403668854871c746face26) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: d3d: Fix up non-vsynced presentationLaszlo Agocs2022-01-252-26/+50
| | | | | | | | | | | | | | | | Doing Present(0, 0) is not necessarily sufficient to get rid of blocking. It may very well start blocking after a few frames. This does not apply to a non-flip-discard swapchain (when running with QT_D3D_NO_FLIP=1), but for flip-discard we should also try using DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING and DXGI_PRESENT_ALLOW_TEARING in case a swap interval of 0 is wanted. Fixes: QTBUG-99949 Change-Id: I9cb13b139ba04e41b4f25b94bcd3d1e973496414 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 6dd09664b280df827788ab7d21c0e279b1f79c5a) Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix memory leak in QtConcurrent::run when called with a NULL QThreadPoolSona Kurazyan2022-01-252-0/+24
| | | | | | | | | | | QThreadPool automatically deletes the runnable after it finishes running the task. In case QThreadPool is nullptr, we should delete the runnable manually. This amends 87b93c29be02f0a7ff9424b5e2b6431e20bd4c40. Change-Id: Id7e4ed3d4d6de05990edf62e4099852983debc64 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 4cd8eeaf8c6a05f09bdbc92690b63f5233abdad0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace cxx17_bm_searcher config check with feature test macroMarc Mutz2022-01-243-28/+1
| | | | | | | | | | | This enables the code also for boostrap. Amends b24e689cb561d81745ff47a5ce4595b809923914. Change-Id: I8efc76c20690282a2428f360d6b93896966b97ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit df0f8e036cdef59d596113c4acb450258aba11d3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>