summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "QImage::operator==: Also compare the image colorspace"v6.3.0-rc1Allan Sandfeld Jensen2022-03-231-1/+1
| | | | | | | | | | This reverts commit 019d0dd4b49d5a0e9cbb73829158e798ea25fd86. Reason for revert: Causes test failures, and better for just 6.4 Pick-to: 6.3 Change-Id: Iaf1dc18d6f347fd203b07253ad502b6060486157 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Update QTimeZone documentation on the limitations of MS's dataEdward Welbourne2022-03-221-2/+5
| | | | | | | | | Describe the work-around of ignoring claims of DST prior to 1900. Change-Id: Ia8a2e6530b285cc8012423ba174fea47732e9ecb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io> (cherry picked from commit bc91be6a5f57ec61287a0cc83e1264417448e74a)
* Install QtCopyFileIfDifferent as the 'public' cmake helperAlexey Edelev2022-03-221-1/+1
| | | | | | | | | | | QtCopyFileIfDifferent needs to be both installed and copied to a build folder as a public CMake helper. Otherwise it's not found when building tests inside the Qt build tree. Fixes: QTBUG-101916 Change-Id: I8d081e594fe694f528ebac4c13bbdf6d3b8402b9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit ea30708972d37063b3fb79162483d85c5d5cb1a0)
* Fix warning from deprecated QMouseEvent constructor on macOSVolker Hilsheimer2022-03-211-2/+2
| | | | | | | | | Pass global position explicitly. Change-Id: I4b9bf735635528c4a289be7db6026162d5a7aff6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 9d12f6adbc36fab274fb4a6b46247ad37f1d2ce1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Build QMenuBar test without warningVolker Hilsheimer2022-03-211-1/+1
| | | | | | | | | Adapt to changes in QWidget::addAction API from 08e4d2db084f6abbf1840ff. Change-Id: If6e05b47de88cf55070238f08b96586b855cc5c1 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit f3466fad530d83f02b49cd9a9f59c2510c018dce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtGui: compile-optimize inline swap functionsMarc Mutz2022-03-1923-26/+26
| | | | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Task-number: QTBUG-97601 Change-Id: I987ff95e8751a22a4f283655d8225dd16de21178 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c839efb07a6aa3b487dac5f86f905f35ef2c3a08) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't build the movie example if the feature is disabledAlexandru Croitor2022-03-191-1/+3
| | | | | | | | Fixes: QTBUG-101897 Change-Id: Idef9aaa0c0a0380b88d8769cb19becd613b2173b Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 4b7225c66211ae242cf6d8dc7624f5de95087b8d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMargins: fix a missing "full stop" in the docsMarc Mutz2022-03-191-1/+1
| | | | | | | Change-Id: Ic8012ce12ef8d2fee2dc785e373e9c9d8f658ff5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 98cbdae527b360e0e6d630848a375c6a025f572d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix lancebench after lancelot restructuringAllan Sandfeld Jensen2022-03-191-1/+1
| | | | | | | Change-Id: I5e17230761ca5482b3376787afab29d15de58dac Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 173dd2a033ff9caf045cb150d68eca1ce37ac5e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* When clearing selected items, iterate over a copy of the QSetVolker Hilsheimer2022-03-192-2/+73
| | | | | | | | | | | | | | | | | Selection change handlers of the items might call a method that implicitly recreates the selectedItems QSet, which then invalidates the iterators of the ranged for loop, resulting in crashes. Iterate over a copy of the set instead. Add a test case that crashen without the fix. Fixes: QTBUG-101651 Change-Id: I6da6f4043fe1906b0186931a37283f635cb5a404 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 5e566ab373bd6161f82b00c5a1f24bd210051140) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* coin: Use configure and qt-configure-module in instructionsAlexandru Croitor2022-03-1819-122/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to use configure and qt-configure-module when building in Coin, rather than pure cmake and qt-cmake. There are a few benefits: - CI tests the scripts, making sure we don't introduce regressions - CI uses the same scripts that we mention in our documentation for developers to use - The platform configurations become a bit less verbose and easier to read due to less shouty-case CMake options To ensure a more gradual porting, Coin will only use the new instructions if the 'UseConfigure' feature is set on a platform configuration in qt5.git. This allows going back to the old instructions in case if something isn't working properly. Due the opt-in, we need to support both old and new instructions in the implementation. The change strives to remove as much duplicate code as possible, by moving it into common includes. The README.md is updated to mention the overview of how the different environment variables are used. There are a few important things to point out. 1) Because during the porting we have to allow mixing of the old style and new style, platform configs have to separate CMake-style options from configure-style options in different environment variables. Otherwise the instructions wouldn't be able to create a valid configure call, where all CMake-style options have to go at the end after a double dash --. After all platform configs are ported to the new style, it should be possible to combine all the options in a single environment variable if that is desired, but it will require another round of porting to remove all the '-D' prefixes in CMake-style options, and just use regular variable assignment which configure supports. e.g. -DQT_BUILD_EXAMPLES=ON becomes QT_BUILD_EXAMPLES=ON, which can be mixed in-between configure-style args. 2) Configure is more strict in that it doesn't allow passing unknown options. Due to that, we can't pass non-qtbase configure options via NON_QTBASE_CONFIGURE_ARGS. qt-configure-module would error out in the repos where the configure option is unknown. Because we don't have a Coin configure variable for each repo, we circumvent the issue by continuing to pass CMake-style options via NON_QTBASE_CMAKE_ARGS instead, which does not do validation checks. In the future, we could introduce a configure flag that disables the validation checks. Task-number: QTQAINFRA-4357 Task-number: QTQAINFRA-4815 Change-Id: I72d8ba0b3a543b42982e22ae8d6566c0e885c446 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Toni Saario <toni.saario@qt.io> (cherry picked from commit 440438092bc6276399cbb1bd9425227898221587) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Mitigate moc not finding correct headers in framework buildsAlexandru Croitor2022-03-181-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CMake generates compilation rules, it extracts the values from INTERFACE_INCLUDE_DIRECTORIES and checks if any of the values are framework paths. If they are, instead of adding an -I ./lib/My.framework to the compilation rules, it adds -iframework ./lib or -F ./lib. The same transformation does not happen when AUTOMOC passes include paths to moc, nor during a headersclean check. The values there are passed verbatim, with an -I prepended. This causes issues when the include file name is the same as the framework name. E.g. #include <QtQml> + -I ./lib/QtQml.framework because moc then ends up silently including the shared library ./lib/QtQml.framework/QtQml instead of the header ./lib/QtQml.framework/Headers/QtQml This can lead to a variety of silent issues during moc generation, because all the definitions of QtQml will be missing. Unfortunately, there does not seem to be a clean way to fix this in the build system due to CMake semantics. See https://gitlab.kitware.com/cmake/cmake/-/issues/23337 for details. We can mitigate the issue by ensuring that -I ./lib/QtQml.framework/Headers comes before -I ./lib/QtQml.framework by manipulating the order of values in INTERFACE_INCLUDE_DIRECTORIES. We might want to consider implementing an additional mitigation in AUTOMOC, so that it filters out include paths like -I ./lib/QtQml.framework, thus ensuring that a newer CMake version will not exhibit the same issue when used with an older Qt. We could consider doing the same in moc. The advantage of doing it in moc is that that moc will consider fewer invalid include paths when searching for headers. Amends 4b2de41b13eb71c0ce841ef357768a3913b49810 Amends d7efb2a419a88c8f512b98194c8f7bc81dbe942b Fixes: QTBUG-89545 Fixes: QTBUG-101718 Fixes: QTBUG-101775 Change-Id: Ib2c25b5744bd2b5c9c83813bb04ad88c0179f6ec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit b858704e1fd5b94349147d2a287b1d89e1799af0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMetaType: remove an unused static pointer variableMarc Mutz2022-03-181-2/+1
| | | | | | | | | | | | | | Unlike the Gui and Widgets pointers, the Core one wasn't needed, because the only user can inline the variables contents. Saves one relocation. Change-Id: Ib7535e1a29c5125eea55c66dad6d2d1de72f6bc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 7ed5b52e80df7007a2e3197cff198988b95d9525) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: Use python3 for enumerating test target devicesAlexandru Croitor2022-03-181-1/+1
| | | | | | | | | | macOS 12.3 removed python 2 Fixes: QTBUG-101745 Change-Id: Ieace2623e838cf36a7a68186b0f729ff0f19299a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9ec05e4f361f11796177ff2d26eaa078d733ad82) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QImage::operator==: Also compare the image colorspaceAlbert Astals Cid2022-03-181-1/+1
| | | | | | | Change-Id: I4cb86d32492876791fe852f8c3123b7d4a69a5bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 6e23fc85805dd28c45ba04e14da6ae3ec49452a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDateTime: future-proof swap()Marc Mutz2022-03-173-1/+18
| | | | | | | | | | | | | | | | | | | In Qt 7 32-bit builds, the ShortData will be larger than the d-pointer. So don't swap() the d-pointer, but a) delegate to Data to swap itself and b) swap the ShortData there, adding a static_assert in the .cpp file that triggers when the assumption that ShortData is always at least as large as a pointer is violated. Found while porting away from overly-generic qSwap(), so done that, too. Task-number: QTBUG-97601 Change-Id: I5139da58d99e9491a582ff2cb2f817cd96952044 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9f8da21239a4d9e22a2d5633920c36af4eb4a6c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLibrary: restore translated stringMarc Mutz2022-03-171-6/+6
| | | | | | | | | | | | | | | | | | We want to pick this change to LTS branches, so we cannot change the translated string. Instead of fixing the order of placeholders, use multi-arg, which performs only a single pass over the input and doesn't suffer from placeholder injection by interpolation the way .arg() chaining does. Requires to use QString::number(), though. Amends 3636325946b471d48043540e309bf6f52be45331. Change-Id: I6484a052115096c609edfea27dfd36b196efc1b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 73d0174f50374090d0d0b45322e86b2ca825886d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rest of QtBase: compile-optimize inline swap functionsMarc Mutz2022-03-174-8/+6
| | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers and owning containers In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Task-number: QTBUG-97601 Change-Id: I53e031a021031d53a74a712cd0f5e6bb8bf800bd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 60592f72d61366922771b90bed95b596e05a1545) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtDBus: compile-optimize inline swap functionsMarc Mutz2022-03-177-11/+11
| | | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers and owning containers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Task-number: QTBUG-97601 Change-Id: I2cb0dd3cef3a2923e7d08bb9d93c692308797e5b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 870bb22c17e5578ead427821998b9e62201f7b5d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtNetwork: compile-optimize inline swap functionsMarc Mutz2022-03-1717-23/+23
| | | | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Task-number: QTBUG-97601 Change-Id: I26586da1f158fe6b18314abd8cf9bb040bc9cad1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit f438d29b6fdfff0680b09e88590ee47b22877776) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid populating font family aliases if family matchedTor Arne Vestbø2022-03-171-9/+15
| | | | | | | | | | | | | | | | | | When trying to match a font request to fonts in the database we might end up with a mismatch due to the style not being available, but the font family itself was. If that's the case there's no point in trying to populate font aliases, so we explicitly propagate this fact back to QFontDatabasePrivate::findFont so that it can choose to not populate family aliases. Fixes: QTBUG-98369 Fixes: QTBUG-99216 Change-Id: I14470554c73eace836f57cb65e63ada594ccf62e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 69d525a6fa19934b3e57f503132bb4ab19f6b923) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QTabBar test in tst_baseline_widgetsAxel Spoerl2022-03-171-0/+124
| | | | | | | | Task-number: QTBUG-99772 Change-Id: I501c8e5c8e3ee1a1d3ac2a36b12f51dab90c88c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 878aea36457a1c270586774e68e56acaef14950a) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* wasm: remove compiler and linker warningsLorn Potter2022-03-172-23/+31
| | | | | | | | | | | | INITIAL_MEMORY and PTHREAD_POOL_SIZE are linker flags only USE_PTHREADS is both linker and compiler arguments. Also increase default INITIAL_MEMORY Change-Id: Id1998efbf1d6de901f404db7e988f6cafd547a39 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit d10b910e39c1d018c3d78f7f9c1ef31b37e4a132) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAnyStringView: fix code point -> code unit in the docsGiuseppe D'Angelo2022-03-171-1/+1
| | | | | | | | | | | The docs are saying that QAnyStringView sizes are measured in terms of code units of the underlying encoding, not code points. Change-Id: Ic72ffd122e45631e8626c9d57ec24ca348918424 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 3f06d47e5757d7cbc5e21b9cfb2008a9a6510b96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QBitmap::fromPixmap: document \sinceGiuseppe D'Angelo2022-03-171-0/+2
| | | | | | | Change-Id: Ia8b4e20dc98e3b184b6e2ba9844907f813dbc1ab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit d45d62f09dd276faf3d960d18aba191e4c3c78ba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QByteArray: fix isUpper/isLowerGiuseppe D'Angelo2022-03-172-47/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 577d698b8e72bc0969ae7545a1a56d3a3d08bdda changed QString::isUpper / isLower behaviors to match Unicode semantics: a string is uppercase if it's identical to its own toLower/toUpper folding. These semantics come from Unicode so they're not up for debate. That commit however left QByteArray untouched. Generally speaking, we want to move away from QByteArray as "text storage" -- this has partially happened between Qt 5 and Qt 6, where QByteArray went from Latin-1 semantics to ASCII semantics. Still, QByteArray offers toUpper/toLower and isUpper/isLower and all this family of functions should be consistent in behavior. Apply the same fix that was applied to QString. [ChangeLog][Important Behavior Changes] The semantics of QByteArray::isLower() and QByteArray::isUpper() have been changed. Now lowercase (resp. uppercase) byte arrays are allowed to contain any character; a byte array is considered lowercase (resp. uppercase) if it's equal to its own toLower() (resp. toUpper()) folding. For instance, the "abc123" byte array is now considered to be lowercase. Previously, the isLower() (resp. isUpper()) functions checked whether the byte array only contained ASCII lowercase (resp. uppercase) characters, and was at least 1 character long. This had the side effect that byte array containing ASCII non-letters (e.g. numbers, symbols, etc.) were not lowercase nor uppercase. [ChangeLog][QtCore][QByteArray] QByteArray::isLower() and QByteArray::isUpper() now work correctly with empty byte arrays. The semantics of these functions have been changed. Fixes: QTBUG-100107 Change-Id: Id56a42f01b2d1af5387bf0e6ccff0f824f757155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 2d95b7534530fec1e1e52ef7e8be289abb48b822) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing install of pnglibconf.h for static buildsMichal Klocek2022-03-171-0/+1
| | | | | | | | | | | Installing only pngconf.h is not enough. This commit amends be2745e4788cecb0d3122081e3328e4b66923609 Change-Id: I8de1565434c315c7197d4602a8460ead794176d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2f894293aee187726599793fcf33f28fc5093829) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix has_signaling_NaN usage for INTEGRITYTatiana Borisova2022-03-162-4/+6
| | | | | | | | | | | - The newest GHS compiler versions set the value of has_signaling_NaN to False. Add compilation and autotest fix for GHS-compiler 2021/2022 releases. Task-number: QTBUG-99123 Change-Id: I45e5da6759a15c60c17f896e565002cbba8524ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 715420095a97acccb5c56281890784d7e08ea8fd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix typosRobert Löhning2022-03-161-2/+2
| | | | | | | Change-Id: Iaea3c0e567ddd6a72db0b2ba1731c416cf85ef47 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 286a63898f724e4392faea08c7f38bcb65633615) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAction: Add NOTIFY changed declaration to priority propertyKai Uwe Broulik2022-03-161-1/+1
| | | | | | | | | | | | It already emits the signal and was merely missing the declaration. This fixes warnings about depending on non-NOTIFYable properties when binding to the priority property from QML. Change-Id: Ia91ae5d00d722bdb2fc1f89671c3e7faab4b129f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e516a7bcf898919a908a0d8e0f389aba6059fb55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix clang-cl warningAllan Sandfeld Jensen2022-03-161-3/+3
| | | | | | | | | Warns the include is non-standard, so replace it with standard includes. Change-Id: I8db4b65a3f706cb31215332277a3378df88a0003 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit e1b76e68d0dae2eff00dc70fe56ca5e6029045e6)
* QByteArray: fix append() with a negative lengthThiago Macieira2022-03-162-2/+3
| | | | | | | | | | | | | The documentation says that if it's negative, we find the null termination. This bug was introduced with the clean up to use QByteArrayView in commit 8897aa071a668563a53a4c2e6909572f1762b1e7. Fixes: QTBUG-99640 Change-Id: Ib42b3adc93bf4d43bd55fffd16c89fa4a960f3a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit bb35b2f64dfa18c491aed8b8103941325df3228b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLibraryInfo: remove load-time variableThiago Macieira2022-03-164-6/+9
| | | | | | | | | | | | | Since this is only used by qtpaths and qmake, let's not make every application pay the price of dynamically initializing a QString whenever QtCore is loaded (which 100% of Qt applications do). Instead, initializing a null pointer costs zero and is one third the size of QString. Even the assignment in qmake and qtpaths is faster this way. Change-Id: I6fcda969a9e9427198bffffd16ce8d1eb8dc19da Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 8058127a9df0b66f28908f42e4f533165468de95) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qglobal: Move the export macros further up in the fileThiago Macieira2022-03-161-31/+29
| | | | | | | | | | | | | Before the #ifdef __cplusplus and namespace start. We don't need to export anything from C (and I hope that remains the case), but at least this removes the need for QT_{BEGIN,END}_INCLUDE_NAMESPACE. Which also weren't needed. Change-Id: I54f205f6b7314351b078fffd16d0bc84c57cb2ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 0e84d04b90a7e98847f92a2d644120d23c7c051c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTextFormat: remove unnecessary namespace-scope stream op declarationsThiago Macieira2022-03-161-10/+0
| | | | | | | | | These two pairs already exist as hidden friends inside the two classes. Change-Id: Ic15405335d804bdea761fffd16d4a3bc633e6d53 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a072de78dd441c957236de767b65b3a969a3de61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qstring: properly fix the build when LC_MEASUREMENTS is not definedThiago Macieira2022-03-161-1/+1
| | | | | | | | | | | | Instead of proxy-testing for the OS, test for the thing you're going to use. Fixes the build on FreeBSD. Change-Id: Ibf4acec0f166495998f7fffd16d693df09871492 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit c9f6678fb44adba6b5e6675cbb32e5eb470071ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Logging: rejiggle the way we detect the availability of backtrace() APIThiago Macieira2022-03-163-16/+11
| | | | | | | | | | | | | | | | We had proper CMake tests for all we needed, so we can drop the old detection we were forced to use way back when. Said test (CMake's own FindBacktrace.cmake) even found QNX's offering, which we reported as "yes" in our configure output, but never actually used because it was a different API. Now we'll report "no" for QNX. Change-Id: Ic15405335d804bdea761fffd16d4f73cfe4cf38a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 6358bc9331a961b882173367e9483f4eb4ca4783) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Logging: remove magic constant from backtrace codeThiago Macieira2022-03-161-1/+13
| | | | | | | | | | Explain what that number 8 is by way of a comment and a constant. Change-Id: Ic15405335d804bdea761fffd16d4f7567089c575 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ee7166e1761c3b5ca885bab299a7d036e884c2e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Logging: fix encoding of backtrace linesThiago Macieira2022-03-161-1/+1
| | | | | | | | | | File and function names are UTF-8 on Unix. Change-Id: Ic15405335d804bdea761fffd16d4fb71ec2b0d71 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 50132fb54b6e1b8b9f405eb42f6088d8ec7b3f3c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't rely on CMAKE_FIND_ROOT_PATH_MODE_PACKAGE for examplesAlexandru Croitor2022-03-161-9/+4
| | | | | | | | | | | | | | | | | | We shouldn't set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to BOTH when cross-building examples without ExternalProjects. Instead append the $build_tree_prefix to CMAKE_FIND_ROOT_PATH and $build_tree_prefix/lib/cmake to QT_EXAMPLES_CMAKE_PREFIX_PATH to circumvent the usual CMake path-rerooting issue. This ensures that the build-tree Config files are found by the in-tree find_package calls when cross-building examples. Task-number: QTBUG-96232 Change-Id: I4e31f0bf3dbfeb4339823fe09addda3ae83f12c3 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d1c56073b4cf3346168413e7d931c63355307e9d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use QDebugStateSaver in example operator<<()Kai Köhne2022-03-162-1/+6
| | | | | | | | | | | This makes sure that changes in the debug stream - like nospace() - do not "leak". Also use the example snippet in QDebugStateSaver documentation. Change-Id: I934976d2c7c2335abfec68c763526a5cbb0e6f1e Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9f5f64e9dbd916679bd881ee0331da9a3dacac32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Enable tests to turn off Windows Vista animationsVolker Hilsheimer2022-03-163-7/+25
| | | | | | | | | | | | | | | | | Animations in that style depend on the current time, which makes it impossible to run baseline tests. Introduce a dynamic property that allows us to set the time that animations use. This way, tests can turn the animation off, or control which time should be used. To keep performance overhead low, check only once whether the dynamic property is set at all. Change-Id: I9bc57b9867fb0d852e101570eca4c7609e7fe1a8 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 58a14d943353f02bfbee0a65f5e31c40358c8c53) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix cross-building examples in prefix builds as ExternalProjectsAlexandru Croitor2022-03-161-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For examples to successfully find not yet installed Config files in a prefix cross-build, both CMAKE_FIND_ROOT_PATH and CMAKE_PREFIX_PATH need to be adjusted when toolchain files set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY. Before this change, we lacked two things. 1) If the chain-loaded toolchain file sets CMAKE_FIND_ROOT_PATH (instead of appending), then the initial value of CMAKE_FIND_ROOT_PATH that was passed by ExternalProject's initial cache would be overridden. 2) The prefixes we passed via QT_EXAMPLES_CMAKE_PREFIX_PATH did not end in lib/cmake, to work around the path re-rooting problem in CMake. We can handle both of these points by using QT_ADDITIONAL_PACKAGES_PREFIX_PATH which was introduced for Conan usage. Each value assigned to QT_ADDITIONAL_PACKAGES_PREFIX_PATH gets prepended to CMAKE_FIND_ROOT_PATH by qt.toolchain.cmake AFTER the original toolchain file is chain-loaded. And each value also gets lib/cmake appended and assigned to both CMAKE_PREFIX_PATH and _qt_additional_packages_prefix_paths (used by Qt6Config.cmake.in to work with find_package + NO_DEFAULT_PATH). This is exactly what we need to ensure examples build. Task-number: QTBUG-96232 Change-Id: I11a52457ff795a6661a3a7b68e823e0615d0ce89 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit c89da212494eded0c4444e573ad7e8c5877350ea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Add deployment auto testAlexandru Croitor2022-03-163-0/+126
| | | | | | | | | | | | | | | | | Add a cmake test that builds a simple widgets application, installs it, in a shared Qt build deploys the runtime dependencies and then runs it to confirm that the app works. With a static Qt, the installation of the runtime dependencies is skipped, but the app should still run. The test is expected to pass only when targeting Windows and macOS (both when using shared and static Qt). Task-number: QTBUG-98545 Change-Id: I41b616e1e1fc463d57c64be9273ed4dc755e9187 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 21bffeec9031bc1b5e1cb518508650fe4ad04225) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMainWindow: Fix unused separator widgets blocking mouse eventsEike Ziller2022-03-162-0/+9
| | | | | | | | | | | | We need to hide separator widgets that are unused, otherwise they block mouse events from the underlying widgets. Fixes: QTCREATORBUG-24600 Change-Id: I98c6d4860f683a861b89c4cad042bb734f590000 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 9943cf73717a497c7fec5989968311abd9f5d61b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QToolButton texts and add more stylesheets to test withAxel Spoerl2022-03-163-7/+39
| | | | | | | | | | | | Adapt QToolButton texts to descriptive versions. Add dummy stylesheet that will be used for all test functions, and a specific style sheet to test rendering of QToolButton with a menu button. Task-number: QTBUG-100401 Change-Id: I5440407ddb3ea5b45124e77a6f0d1013362b4398 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 43b25286ced04e95e666a552bbe757e4fbeeba67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use block char format to render list item bullets and numbersAlbert Astals Cid2022-03-161-1/+1
| | | | | | | | | | | | | | It needs to be rendered with the format of the block not the format of the first letter of the block; otherwise if the first letter is black or italics or something, but the rest of the block isn't, the list item text looks out of place. Task-number: QTBUG-3583 Fixes: QTBUG-99148 Change-Id: I63d8d6d6b7cee6bd9938fe1cf42a5f90da1bc0d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 7e7f5f97832e8bf0b260f21aa912812eefaa5997) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QMetaType::typeName returning wrong result for clang-clAlexander Neumann2022-03-161-2/+4
| | | | | | | Change-Id: I94fa1d56d98b8caae514b37fbf6432985195d827 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d49f5752a560d7c8fec99c57bbfb192a9be1b296) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_qscreen::grabWindow on WindowsFabian Kosmale2022-03-161-0/+2
| | | | | | | | Task-number: QTBUG-100412 Change-Id: I8497cf31d690bc5fc22d808cba95254b7fedcc49 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 8b87c6f1989754aa37aa2a6794954df68d3374d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Blacklist: test cases blacklisted in tst_QXmlStream:"Heikki Halmet2022-03-161-4/+0
| | | | | | | | | | | This reverts commit eaa3faeacdcd771bac19361a4218bb0555e71364. Reason for revert: Unnecessary blacklisting Task-number: QTBUG-101332 Change-Id: Ib7148b0c4f7f0d7c8acd5ed7d561509695f4d64e Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>