summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve KTX file reading memory safetyv6.6.26.6.2Jonas Karlsson2024-02-095-52/+197
| | | | | | | | | | | | | | | | | | | | | * Use qAddOverflow/qSubOverflow methods for catching additions and subtractions with overflow and handle these scenarios when reading the file. * Add 'safeView' method that checks that the byte array view constructed is not out of bounds. * Return error if number of levels is higher than what is reasonable. * Return error if number of faces is incorrect. * Add unit test with invalid KTX file previously causing a segmentation fault. This fixes CVE-2024-25580. Fixes: QTBUG-121918 Change-Id: Ie0824c32a5921de30cf07c1fc1b49a084e6d07b2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 28ecb523ce8490bff38b251b3df703c72e057519) Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
* Q(Plain)TextEdit: don't crash when using a style sheetChristian Ehrlicher2024-02-094-2/+23
| | | | | | | | | | | | | | | | | When using a style sheet, Q(Plain)TextEdit::isReadOnly() might get called during the initialization before d->control is properly initialized which lead to a crash. This amends 43ce457cbd093fc06d99b5ac833c789ef7c893d5. Fixes: QTBUG-121697 Fixes: QTBUG-121790 Task-number: QTBUG-1857 Change-Id: I15c357c9eef7f6559bcc2ad89033a3d8e7fcbfef Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit c6af5b9c12e1ea4cec007c5efe869636ce97a9d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e9b187a836974f05ba8f42eb72854a5effdc6c15) (cherry picked from commit ff1f12d5a0f57143e0e3c8d781bb3fdc884af7bc)
* Update bundled libpng to version 1.6.42Eirik Aavitsland2024-02-0910-99/+105
| | | | | | | | | | | | [ChangeLog][Third-Party Code] libpng was updated to version 1.6.42 Change-Id: Ie41c2df610fcd456af2bc4dee05dde90c426602b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit a046bc19e451f6f2e42ac1fcddaf5ef3efc81f0d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cd59980f726b5254bd56197acc6f0cbe6d5f1f46) (cherry picked from commit 85ac5cb9796f40cd01cf585978a7ad54cc75f23d)
* Update bundled libjpeg-turbo to version 3.0.2Eirik Aavitsland2024-02-0916-121/+148
| | | | | | | | | | | | [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.0.2 Fixes: QTBUG-121737 Change-Id: I0085f0f859dd9c95ed203fd22bd9702fd1e9d721 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 972bd4ed46be6ad905f2cd8bd84776cf3f1f3220) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 27625a33c548e1330ad93f81567d357fe5f4d224) (cherry picked from commit 027724d66e649f51fee8f96fe1a2e48892848307)
* CMake: Fix undefined symbol: qt_resourceFeatureZstd issueAlexandru Croitor2024-02-081-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, host rcc might generate zstd compressed resources, even though the target might not support zstd decompression. To avoid that, we made sure to disable zstd compression when using cmake api like qt_add_resources if the target platform does not support it. We did not do it for CMAKE_AUTORCC though. In such a situation, the linker would fail with: error: undefined symbol: qt_resourceFeatureZstd Add the --no-zstd option to AUTORCC_OPTIONS for targets that are created by Qt CMake public API like qt_add_executable and qt_add_library if the target platform does not support zstd decompression (check via the QT_FEATURE_zstd variable). This in turn applies to our own qt_internal_add_ API as well. Allow opting out via the QT_NO_AUTORCC_ZSTD CMake variable. [ChangeLog][Build System] Targets created with qt_add_executable and qt_add_library will now add the --no-zstd option to AUTORCC_OPTIONS when the target platform does not support zstd decompression. You can opt out via the QT_NO_AUTORCC_ZSTD cmake variable. Fixes: QTBUG-121948 Task-number: QTBUG-106466 Task-number: QTBUG-101353 Change-Id: Ibdcfecd9a4b1e206479a3f4588b1b624dd91e122 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 329dbfcc78d067d26b5a4dd99f4284900fd68f2c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2cf327be826251ad4b82d07366ba32f76fd800d9) (cherry picked from commit 3738a2dc6742fa3303f114537de65893103d7ca5) Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Don't condition deferred exec on specific NSAlert to be the modal windowTor Arne Vestbø2024-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When a QMessageBox is created with setModal(true), the user can in theory choose to show() it, and then return back to the main event loop, instead of calling exec(). We tried to support that case via a single shot timer, called on the next pass of the event loop, that checked if the applications' current modal window was the alert, and if not, showed it at that point. That logic failed when there were more than one alert show at the same time. We do maintain a stack of the modal sessions and their windows in the Cocoa event dispatcher, so we could use that to check if a modal session had been started for the alert's window, but a similar solution is to just check the alert window's visible state. Fixes: QTBUG-121557 Change-Id: I6f52a53e8f678bb8a071e334a09ab30669d95bbf Reviewed-by: Eike Ziller <eike.ziller@qt.io> (cherry picked from commit 7edff3f15ae21c2310437e0711f84442a21cb6a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c967ee08c82aef011b319e5efacf5d1269c18e90) (cherry picked from commit 7c782dc20a032a612271341b7a067b9397386502) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update md4c to 0.5.2Shawn Rutledge2024-02-063-258/+258
| | | | | | | | | | | | | | Followup to c29a235833410fde4cb4d502f89129bccd7403f0 [ChangeLog][Third-Party Code] md4c was updated to 0.5.2. Task-number: QTBUG-121442 Change-Id: I097d9aa5f54c59c301a91fb824adf949daae3af2 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 16bcdba8e7adae79729c6347e711bd0a976dbbe7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ff8928d3cbaa8366a861317f11cb49449dc49eda) (cherry picked from commit 14671775ed868630e31104da89b423765092e7f6)
* SQLite: Update SQLite to v3.45.1Kai Köhne2024-02-063-93/+137
| | | | | | | | | | | | [ChangeLog][Third-Party Code] Updated SQLite to v3.45.1 Change-Id: I8083d0750e52b1035919821c25cef9855afea2f9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 40a87ca1b421457fc2a31cf385eb5a0eda83486f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2c53d990f7c5f77b58a2b5550c2bf6d0adc306a6) (cherry picked from commit 5de945fb3c500f2a67d60f5ec71cd87c632aade4)
* Update bundled libpng to version 1.6.41Eirik Aavitsland2024-02-0621-306/+427
| | | | | | | | | | | [ChangeLog][Third-Party Code] libpng was updated to version 1.6.41 Change-Id: I3285bfa11f61c571ffda1b365011a5c6a798ca68 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 528032c02771ddc35d054ff8d414b382904b607e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 03bf71b7ff505b683edd484892f429a21b52d201) (cherry picked from commit 48b36d89c4b03e31d481c77b9383bd4517517c3b)
* QDialogButtonBox: Don't set focus in a dialog with StrongFocus childrenAxel Spoerl2024-01-304-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QDialogButtonBox with the first accept button becoming default, didn't explicitly set focus on such a button in a QDialog. d44413d526ec12ed83acd7343c2005782178c7ad implemented this missing functionality. It set focus to the automatic default button, unless the QDialog had a focusWidget() set. That has caused a regression, in cases where - the QDialog has a QWidget child with a Qt::StrongFocus policy, and - the QDialog is not yet visible, so focusWidget() returns nullptr. Amend d44413d526ec12ed83acd7343c2005782178c7ad: Implement a helper in QWidgetPrivate, that returns true, if a child with a given focus policy is found. Do not set focus to a QDialogButtonBox's automatic default button, when - not located inside a QDialog, or - a focusWidget() exists, or - the dialog has QWidget child with Qt::StrongFocus, that is not a child of the QDialogButtonBox. Add an autotest function. Fixes: QTBUG-121514 Change-Id: I3c65ae36b56657f9af4a3a4b42f9b66e8bc5c534 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* API Review Widgets: Remove QDockWidget debug operatorsAxel Spoerl2024-01-302-26/+0
| | | | | | | | | | | | | | | Adding specific debug operators for QDockWidget has introduced new symbols in 6.6.1. Remove them again, we maintain forward binary compatibility within a patch cycle. [ChangeLog][QtWidgets][QDockWidget] Removed debug streaming operator incorrectly introduced as a new symbol in Qt 6.6.1. Task-number: QTBUG-119952 Change-Id: I1d5b96b442dc910d1782dbede6119708d8336991 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit fb92bb073e6e1dd327b9ee94bb1e5726e96396bf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Add the support of the qt_import_plugins functionality to ↵Alexey Edelev2024-01-293-55/+24
| | | | | | | | | | | | androiddeployqt" This reverts commit 6763644c3fc151d6e7716af08531a386557d5a88. Reason for revert: Breaks android automotive and blocks the release. Pick-to: 6.6 6.5 Change-Id: I450dca047d7f105bd60bab3fb698806ef486e581 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Doc: Update Copyright in md4c license textKai Köhne2024-01-271-1/+1
| | | | | | | | | | | | | | Amends c29a235833410fde4cb4d502f89129bccd7403f0 [ChangeLog][Third-Party Code] Updated md4c (optional part of Qt Gui) to version 0.5.1. Change-Id: I7c41fc65fbc92670c1fe4bd0b6d2f46674bdb435 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit c92de95bedcd6f3487b254f37270e207ee7b9894) (cherry picked from commit 73cf29184928ab8c40dc98f9ffc18e6db2ddb65d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 64736d2ece9d49bd62d0bd09d224be1b670ac79b)
* Http2: fix 401 authentication required w/o challengeMårten Nordheim2024-01-264-6/+37
| | | | | | | | | | | | | | | | The code did not handle the path where we didn't have a challenge. We cannot recover from that so we just have to fail the request. Amends fe1b668861e8a3ef99e126821fcd3eeaa6044b54 Fixes: QTBUG-121515 Change-Id: Ie39a92e7439785a09cad28e8f81599a51de5e27f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit ffe0271a21e9574d1c9eab5fb9803573e17e0f22) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d5cdfe33a246299fd4799a0b34691f19787b0dc1) (cherry picked from commit 394114e6415689b54cfc868f30daf1da6b153884)
* QCocoaA(11)y: do not try to access an element if rowIndex == -1Timur Pocheptsov2024-01-261-1/+1
| | | | | | | | | | | | | | This ends up in out of bounds exception. Fixes: QTBUG-120469 Fixes: QTBUG-121008 Change-Id: Id895f311bbb59a3734ecadd0d2472a4018332e16 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 75a918d487aabacd2d377e1e79baea7d30deb5ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1e0a6b31603fdb95232e8210512c9ad92ef372af) (cherry picked from commit b97d45c99dc2140c248c9b59727574cd21b7b81f) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Update Zlib to 1.3.1Mårten Nordheim2024-01-2615-117/+147
| | | | | | | | | | | | | | [ChangeLog][Third-Party Code] zlib was updated to version 1.3.1. Task-number: QTBUG-121325 Fixes: QTBUG-121444 Change-Id: I0a72b7966916ccb825c7a8ae251e09b2914f0cf4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> (cherry picked from commit 1579f19cf71aa220da3e8f7417a22baeb87a0f65) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit af9bf8712e48b6da4e56d7b189e63b3e44cd5fb2) (cherry picked from commit 1772c99267988366c68bc35fcdd3a238619dd675)
* Avoid detection of heading in tst_QTextMarkdownImporter::thematicBreaksShawn Rutledge2024-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In md4c 0.4.8, three or more hyphens immediately after text were seen as a thematic break: some text --- But in 0.5.1 it makes the text into an H2 heading (even though this style of heading would normally have the text fully "underlined" with hyphens). The CommonMark spec 0.30 says If a line of dashes that meets the above conditions for being a thematic break could also be interpreted as the underline of a setext heading, the interpretation as a setext heading takes precedence. Thus, for example, this is a setext heading, not a paragraph followed by a thematic break: https://spec.commonmark.org/0.30/#example-59 So the new behavior seems more correct. But rather than testing so deeply, just disambiguate by adding a newline, since Qt may be expected to work with various versions of md4c, and such minor behavior differences are not expected to come up often in practice. QTextMarkdownWriter already adds a newline when writing such markdown. Change-Id: I5a4bf8720d994616274eb8534b4d7085399130fc Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 3bd4c1b670b8b973e8a782bcaec7078027f6ea36) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2f5fe6a9a10f967622f9831e4bd06d633f105e20) (cherry picked from commit 9aedd9413b1543699d24f80a0ebc91e052bf037a)
* Update md4c to 0.5.1Shawn Rutledge2024-01-253-662/+776
| | | | | | | | | | | | Fixes: QTBUG-121442 Change-Id: Ifa4d6d25a9ea967c520f84397906b0af5cde1722 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit c29a235833410fde4cb4d502f89129bccd7403f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 72747668fc68cb1058688f9e52490aa99bb8e5e8) (cherry picked from commit e39259c3f087379f4a801f873a97c6e9519991ea)
* Revert "macOS: Don't crash when starting a drag with empty mime data"Volker Hilsheimer2024-01-251-2/+0
| | | | | | | | | | | | | | | | | This reverts commit 09afa7575276d7b500f17671a1ca9ca677767b44. It broke Qt Designer, which creates QDrag objects without any mime format. It's likely that user code does the same to support internal drag'n'drop. Task-number: QTBUG-119216 Fixes: QTBUG-121512 Change-Id: I8b74f2d9b89588cd35bca9ca20973810036a2635 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 97bb0ecfe628b5bb78e798563212adf02129c6f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit edc4e555454c34bad17e7a5fce338a966a3c57d1) (cherry picked from commit f4e8177411edb5d2ee2b238bc5194660ef0edad9) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWidget: Clean up state that depends on QWindow from ~QWidgetWindow()Tor Arne Vestbø2024-01-243-27/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were assuming that QWidget was in full control of QWidgetWindow destruction, via deleteTLSysExtra(), and that we could limit any cleanups to that function. But in some situations QWidgetWindow is destructed from other code paths, in which case we were left with dangling pointers to the QWidgetWindow in both QTLWExtra, as well as the backingstore. This can happen if there's a child widget hierarchy where there is not a 1:1 mapping between QWidgets and QWindows, for example if the window attribute WA_DontCreateNativeAncestors has been set. In this situation our normal recursion into children in QWidget::destroy() stops at the first widget without a window handle. When we then delete the top level QWindow, the QWindow destructor will delete any child QWindows, which includes our leaf QWidgetWindow. We should probably fix up QWidget::destroy to continue looking for children, even if we don't destroy the current child. But independently of that we should make sure the QWidgetWindow cleans up when it's being deleted, regardless of how it ended up there. There's further room to clean up the deleteTLSysExtra() function and friends, but that's been left for a later time. Fixes: QTBUG-120509 Change-Id: Ib691df164d7c9c83cb464c0a6bf3bc2116e8ca43 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 12203e94f5a34b59b6a7389402c854e823135a35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4f4ffa8a67ac34396a0f16898ffd7b5987e0864d) (cherry picked from commit 06a1e3b3cf47a103aea429053d273810ae576893)
* SQL/MySQL: Fix compilation with MySQL 8.3Christian Ehrlicher2024-01-231-17/+11
| | | | | | | | | | | | | | | | | | | With MySQL 8.3 mysql_fetch_field() was removed which was used in QMYSQLDriver::record(). There is no real replacement function so we use 'SELECT * from table LIMIT 0' to retrieve the schema information. Additionally mysql_stmt_bind_param() was deprecated and needs to be replaced by mysql_stmt_bind_named_param(). [ChangeLog][SQL][MySQL] Fixed compilation with MySQL 8.3. Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-121183 Change-Id: I149836bd5674d0784255baf416d437c424992f20 Reviewed-by: silverqx <silver.zachara@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 41c842d3f7eecdf736d26026427033791586c83a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b9bcaae2266ec531d38552ea945deff0a6c58e7b)
* Doc: Update copyright year to 2024Topi Reinio2024-01-224-4/+4
| | | | | | | | | | | | | Update copyright year in documentation template and copy-notice paragraphs. Pick-to: 6.5 6.2 Change-Id: I0ff70bbd5925078e80e6799ac80cfc8e6e68a2a0 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 091096fed7c69b8c61b313dc1b3b6fe40d42e0b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aab6df9541f37c1160c1aa86f24796a25f81850e)
* Increase precision for QGraphicsView::AnchorUnderMouseThorbjørn Lindeijer2024-01-221-7/+6
| | | | | | | | | | | | | | | | | | | | * Use a more precise view center for views with odd width/height * Use the QPointF version of mapToScene to avoid rounding * Round instead of truncate when setting scroll bar values These changes increase the precision of AnchorUnderMouse, which is important when for example wheel scrolling is used to change the scale of the view. Without these changes, the view shifts slightly with each change in the transform. [ChangeLog][QtWidgets][QGraphicsView] Increase precision for QGraphicsView::AnchorUnderMouse and QGraphicsView::centerOn Task-number: QTBUG-96879 Change-Id: I8199196c671e4aa96732f382e8057468f676b8d7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit d99b0cfed21e05f6e84b97fe8edb68271a34deb2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4f1752a6b9072083ee8408c4cc7f3e821c9661a6)
* CMake: Fix Threads global promotion issue when using static opensslAlexandru Croitor2024-01-222-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and an older CMake 3.22, which is shipped by default on Ubuntu 22.04. If for some reason there's a static openssl library lying around in the default sysroot (or any ssl search path), like in /usr/lib/libssl.a, then CMake's _OpenSSL_test_and_find_dependencies will try to find_package(Threads) because it assumes it has a dependency on the Threads package. Because we do qt_find_package(WrapOpenSSLHeaders) in qtbase/configure.cmake and we do qt_find_package(Threads) in src/corelib/CMakeLists.txt, we would create the Threads target in the root directory scope, and then try to promote it to global in the corelib subdirectory, which fails with CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:260 (set_property): Attempt to promote imported target "Threads::Threads" to global scope (by setting IMPORTED_GLOBAL) which is not built in this directory. Call Stack (most recent call first): qtbase/cmake/QtFindPackageHelpers.cmake:211 (__qt_internal_promote_target_to_global) qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package) Newer versions of CMake's FindOpenSSL actually try to determine if the Threads package is really needed. To avoid the issue entirely, just look up Threads before we look up the OpenSSL package. Pick-to: 6.5 Change-Id: Ia3cde93e26ba004f64105a5b457098e1b9870885 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 85c462855be95afd2afebd345cb4655c00f9824e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9348368772fb983d44b18864ce2e37af966cc977)
* QFontEngine: Silence bogus gcc warningsAxel Spoerl2024-01-221-16/+16
| | | | | | | | | | | | | | | | gcc warns about using uninitialized variables in QFontEngine::getTrueTypeGlyphIndex. The warning is bogus, because all variables subject to the warning are initialized by passing their pointer to qSafeFromBigEndian(). Initialize them anyway to silence the warnings. Pick-to: 6.5 Change-Id: I25e062f25e2b06701af5edca27a9e56b939daa79 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit e957ed97e0a7f6974db7d9f7ea52d94785464880) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9e8761e8e9755eb9dd7461682d47a6c64b39d5c0)
* QPushButton with a menu remains in sunken state after menu closedEd Cooke2024-01-222-1/+49
| | | | | | | | | | | | | | | | | | | | | Regression fix, introduced in: 7199498fb9cbfb5afc043ddb0e630c8ffad5240b QPushButton with a menu will have a sunken state, QStyle::State_Sunken, when the menu has been closed. Expected behavior is that the sunken style is to be removed when the menu is closed. A boolean called "menuOpen" is never set to false after being set to true in the popupPressed() method. When this boolean is true, a sunken state is painted. Fixes: QTBUG-120976 Change-Id: I3e721da5dfbb6db200aa2de7366ac5dc73c873e0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 343551ffae66048599e5360085d1b77f64b9336e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cb6cdad0789c641811542354bf1a4b1093cd5742)
* QProcess/Doc: clarify that started() may be emitted very earlyThiago Macieira2024-01-221-12/+15
| | | | | | | | | | | | | | | | | | | | | | | On Windows, process creation is synchronous so we will always emit either started() or errorOccurred() before QProcess::start() returns. This condition doesn't currently happen on Unix systems, but we could do that because we're now using vfork() on most platforms, so the child process has either successfully execve()d or _exit()ed before QProcessPrivate::startProcess continued. Drive-by reorganization of the code to remove the one-line \note in the middle of the docs. Pick-to: 6.5 Fixes: QTBUG-120968 Task-number: QTCREATORBUG-30066 Change-Id: I4d0668e0fae5299551ff91480828a68e62fdacec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 8e1f9169cac78b0df4dab17ed05765fdab842d07) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 078c68462ed443e4bd09581ed9bf9b4e720840ac)
* QTextImageHandler: Use QUrl::toLocalFile to convert to local file nameChristian Ehrlicher2024-01-222-7/+9
| | | | | | | | | | | | | | Simply stripping away the first six characters does not work on Windows. Amends 2d87c4d881b74619fef966ffb0d7a00cb4ccea50 Pick-to: 6.5 6.2 Fixes: QTBUG-120577 Change-Id: If48ba026785cab784f46109e34ac80e39a990b79 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 52a41bac775bea9057acbc4344a29bb7e63297e3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 66b732244a3e396dfc5028da82321f10ac73e45b)
* tst_QMessageBox::staticSourceCompat(): improve diagnostic outputAxel Spoerl2024-01-221-6/+13
| | | | | | | | | | | | | | | | | | The test function casts QMessageBox::StandardButton variables to integers, to pass them as arguments and verify expected buttons. In case of a test failure, this makes it hard to figure out, why a test was failing. Add a local macro to cast int values back to the enum before calling qCompare(). That way the enum keys will be displayed in the logs. Task-number: QTBUG-118489 Pick-to: 6.5 Change-Id: I23e766d5026cff3e4775db56e58f808809709e4c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit fd710fbba3d24f6192625f586eea57309630f8ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 16ab2eba720b1428e34c76381a0f09b6b70bf9e3)
* QMimeBinaryProvider: move CacheFile up in the fileThiago Macieira2024-01-221-27/+27
| | | | | | | | | | | | | | | | | | Amends 329722a322a80d5ea8d6f9aa993c2fc4995b08a4 ("QMimeBinaryProvider: manage m_cacheFile with a std::unique_ptr"), which added the std::unique_ptr<CacheFile>. This is required because in C++23 std::unique_ptr's destructor became constexpr and is therefore instantiated more eagerly. The type must be fully defined (not forward-declared) when the std::unique_ptr member is initialised in the QMimeBinaryProvider constructors. Fixes: QTBUG-121204 Change-Id: I76ffba14ece04f24b43efffd17ab9a861aff89b8 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> (cherry picked from commit c8db469fd584cfd2bee34b572601b19bfb2cd921) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7d12cf673a221cec92f080e3364cc939ab3dd34a)
* QMetaObjectBuilder: Avoid arithmetic on null pointerFabian Kosmale2024-01-221-2/+2
| | | | | | | | | | | | | | In Prepare mode, "buf" is a null pointer. We never dereference it, but we still compute an offset from it to obtain a pointer to a (then unused) QMetaObjectPrivater. clang's UBSan complains about this, so initialize the pointer to nullptr instead when in Prepare mode. Pick-to: 6.5 Change-Id: Id9d78058f72bb1b44440d07f565374f3eb3c20fd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d3d224f546d933acef53f7592fea7d69072f7d55) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Force CMake to look for static versions of xcb componentsAlexey Edelev2024-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | Add the USE_XCB_<component>_STATIC switches that force using the static versions of xcb components if necessary. The xcb components needs to be built with -fPIC option, to make the static linking possible. When Qt is built staticaly USE_XCB_<component>_STATIC needs to be passed to the application command line, since in static case xcb libraries are resolved and linked when configuring application, but not when building Qt. Pick-to: 6.5 Task-number: QTBUG-120769 Change-Id: I274e9cf4a6a111dc87ad84bb7f49cad76a3d364a Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 6ce6ff1c529a7a4a09f211980cc749c2b3aa0dab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f9d97ee04aed519e78e0b9114866512f83c5a203)
* iOS: Avoid category method name clash for UIResponderPaul Heimann2024-01-206-12/+12
| | | | | | | | | | | | | | | | | As described in Apples documentation, own methods which are added to existing classes should be prefixed to avoid category method name clashes. This prefix was missing from the function currentFirstResponder() which caused issues when closing the virtual keyboard on some iOS devices. (see https://developer.apple.com/library/archive/qa/qa1908/_index.html) Pick-to: 6.5 Task-number: QTBUG-119601 Change-Id: I82fb8a8beeb0a3234594357f1e1db67b0ae3da36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e51b2d70de65f2ac674afb9c7da2a10c7067f142) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 93ddf89037f290c70f986a794b1a34c0dc61d4c7)
* QCalendarBackend: disable copyingMarc Mutz2024-01-201-0/+2
| | | | | | | | | | | | | | | | | Silences clazy-copyable-polymorphic. The Q_DISABLE_COPY_MOVE() disables the implicit default constructor, so bring it back with =default. Amends aa8393c94fea01a4806b204fd3aa343a4e90666b. Pick-to: 6.5 Change-Id: I44f0b19208d3865fb84e277bcaf65d7f4541d368 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit b211d8a8c0196a96b2aa324c9e3d991ae378c7f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 004ccc54d9d26a5215402a82e417ae7f36a07897)
* Make QLocale self-consistent on WindowsEdward Welbourne2024-01-191-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | The constructor and update() method for the system locale were using GetUserDefaultLCID(), where query() and the fallback locale first checked the LANG environment variable, leading to inconsistent results if the user set the environment variable to something different from the system's configured locale. Break out the logic of parsing %LANG% into a static helper, replace the existing parsing with a call to this and add a helper to get the right ID to use, possibly via it, using GetUserDefaultLCID() as fall-back. Drive-by: initialize substititionType in its declaration. Also look up %LANG% each time we want it; it's not that expensive, given how rarely this code is called, and client code could change its value at runtime. Partially inspired by a patch from Wladimir Leuschner <wladimir.leuschner@qt.io> Pick-to: 6.5 Fixes: QTBUG-120961 Change-Id: Ie706c7089bd2b3757a3eab627723ec34a5e2b07f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit fcd2a219c4c222309152f1ea2a3124ddc17d4ea5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cbc3c63633ad2c19ca4aa8fad302a0d1c30e7d7e)
* Prepare to support taking CLDR data from its github upstreamEdward Welbourne2024-01-192-11/+20
| | | | | | | | | | | | | | | | | We've previously used the zip-file form, but that's not been published for CLDR v44.1 - the advice on the list was to use github instead. That, however, has ↑↑↑ as a special value for fields, meaning to inherit from a prent locale. So special-case that value. I have verified that v44 from the zip file produces identical results to v44 from github, with this minor fix. As it happens v44.1 also produces identical results. Pick-to: 6.5 Change-Id: I6eb0aedda7556753cdc83bb9d76652fbb68dc669 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> (cherry picked from commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c112981789f5885e5db0daa4a081fa26708bafb0)
* QMetaTypeModuleHelper: mark instances constexprMarc Mutz2024-01-193-3/+3
| | | | | | | | | | | | | Static and thread-local objects should be constexpr or constinit if possible. Task-number: QTBUG-100485 Pick-to: 6.5 Change-Id: I29088798a50d6278252c9088e7c191c4214b2e5b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 88c3cd6e08c86bfb5bb676ceed4c92344f8ed91c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7b5df411db438cf6f0e26212e33f1f804e6da9f8)
* ibus: avoid a crash when context is not readyAleix Pol Gonzalez2024-01-191-1/+2
| | | | | | | | | | | | This amends 84cf0e2be54d9ad183db063fd429b792c67edd18 Pick-to: 6.5 Change-Id: Ia560f785764d4ba0e4aa66943effb9f16a38e699 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Inho Lee <inho.lee@qt.io> (cherry picked from commit 0d923c2097578682b8553707834ccf52d7cd52e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4f9c75901e1f02eda8fc8b3349b895779da9246e)
* QUuid: Fix Id128Bytes alignment on some architecturesThiago Macieira2024-01-191-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts eb0abd9789062d95bc62dbbc29b2038dc40472b1 so we depend on __SIZEOF_INT128__ in this structure, not on QT_SUPPORTS_INT128 so the Id128Bytes union has a quad-word integer as a member at all times, even in QtBluetooth's removed_api.cpp. That's required because on some ABIs, the presence of this member causes the type to be passed differently, usually in registers (we fixed the stack problem with the alignas(16) in that commit). The "Itanium Software Conventions and Runtime Architecture Guide" did the same back in 2001; section 8.5.1 says integers from 65 to 128 bits are passed "Next Even" and so are aggregates with alignment of 16 bytes. This rule seems to also exist in the AArch64's AAPCS64[1], which says, in rule C.10, that the type should be passed in even registers: C.10 If the argument has an alignment of 16 then the NGRN is rounded up to the next even number. (NGRN = Next General Register Number) It's unclear whether this applies to the union type as a whole or to its individual members. If the latter, then Clang may be buggy. [ChangeLog][Important Binary-Incompatibity Fixes] The QUuid::Id128Bytes type had a loose definition that could cause it be passed incompatibly between functions, in some architectures, depending on whether GNU extensions were allowed. This is now fixed, but may cause code compiled with Qt 6.6.0 and 6.6.1 to fail when recompiled with 6.6.2 or later. [1] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#682parameter-passing-rules Fixes: QTBUG-119248 Change-Id: I6e2677aad2ab45759db2fffd17a86a208f788cb7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 6f9db71154662a648f19a86ca86585eddbe2f9ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8902ed8f896e2a5a54441af8a790a794c452742d)
* wasm: move keyboard input handling for touchscreensLorn Potter2024-01-193-25/+16
| | | | | | | | | | | | | It's better served where all keys are handled, and fixes bug with modifier keys Fixes: QTBUG-118503 Change-Id: Ic53d1b332bd918dbc4fdd27ea4e43ad1e1ecce82 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 75ac9adeda41194e1733c69b3176fc2a368a369e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 020a7e96d448caab86198f09d84b50be205da906) Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Revert "API Review / QDockWidget: Remove const/ref debug operator"Axel Spoerl2024-01-192-9/+11
| | | | | | | | | | | | This reverts commit ca2f46c04c26ed4649cb6c2c62d3b2e52cd8d5ad. Reason for revert: <BIC in 6.6 found by Marc Mutz> Change-Id: Ia5b8849e55ebccb514bc753ce1d31855d91e2406 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit b148a362c36a9b34b0c21c60530353d6bf6b92cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit be4f933c0ae30389869d74277982bd14a99fe11a)
* QMetaTypeModuleHelper: suppress cppcoreguidelines-virtual-class-destructorMarc Mutz2024-01-183-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Says clang-tidy: destructor of '(unnamed struct at qmetatype.cpp:966:14)' is public and non-virtual in file:src/corelib/kernel/qmetatype.cpp line:966 col:14 static const struct : QMetaTypeModuleHelper Yes, these classes are polymorphic (because the base class is). Yes, the destructor is non-virtual (because the base class' one isn't, but it's also protected, so fine). But these classes are not used as base classes, so suppress the warning. Pick-to: 6.5 6.2 Change-Id: I75be86bca36a4a0e93d72acb1a0d2fe0dca1c505 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 11d153ae1ce3ce75e76a1fcac7bf99e4cff05716) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 256ac3994395e308337b5c6ef03a8191ae3690fc)
* Http: Start more connections faster after determining network layerMårten Nordheim2024-01-181-1/+3
| | | | | | | | | | | | | | | | | | | | Previously we would more or less wait for the first connection to finish before initiating more connections. This was just happening by virtue of calling startNextRequest when a request was finished. Since we have already determined the preferred network layer, let's just try to start more connections. In case we are using https this doesn't make a difference because we will try http2 upgrade first before allowing multiple connections. Unless, of course, http2 has been disabled. Fixes: QTBUG-120619 Pick-to: 6.5 Change-Id: Id3c3be59fd07120bff574d63481119e5ed9eb88a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 88f5fc47ebf558fa72b7b447f8394a0d44b6bf9d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0002ba47e63151e37c15b61f0c0b809aefb378e1)
* SQLite: Update SQLite to v3.45.0Christian Ehrlicher2024-01-183-2521/+5495
| | | | | | | | | | | [ChangeLog][Third-Party Code] Updated SQLite to v3.45.0 Pick-to: 6.5 6.2 5.15 Change-Id: Ibf37acf5bcee4639766d445991f5265dc78593c4 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 24a95c22fc9f09ca4415946e965615d022704ca3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6224c3b0dc1bd08e1c5fc0a184b2d22627c480dd)
* Sync QWindow visible state during QWidget destructionTor Arne Vestbø2024-01-182-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | A call to QWidget::destroy() will end up in QWindow::destroy(), which calls QWindow::setVisible(false). A call to QWindow::setVisible(false) on a widget's window will under normal circumstances end up in QWidgetPrivate::setVisible(), which in turn recurses back into QWindowPrivate::setVisible(), via QWidgetPrivate::hide_helper(), ensuring that the QWindow internal state is updated, visibleChanged emitted, and show/hide events sent. Durin QWidget::destroy() we end up in QWindow::destroy(), which calls QWindow::setVisible(false), but in this case the widget no longer has Qt::WA_WState_Created, so the hide_helper() call is skipped, and the corresponding QWindow is not kept in the loop. To work around this we could have checked for windowHandle() instead of Qt::WA_WState_Created before calling hide_helper(), but that had many other side effects, so we opt for a more targeted fix. Pick-to: 6.5 Change-Id: I68f80e5f7df9ee811afcd274a7ee4de31a110da5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 5b09d9e6d694045a6cef15f8984bab63cf86402c) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3bc3cf3ba95819c85fc94cb4bcd65ef6d6748efa)
* Allow configuring the qtbase documentation-only buildAlexey Edelev2024-01-172-2/+2
| | | | | | | | | | | | | | | | Use the QT_SUPERBUILD procedure when configuring the qtbase documentation-only build. This only makes sense for qtbase since we disallow building it using existing Qt installation. Other repositories should be configured using qt-configure-module script from the existing Qt installation and simply run 'ninja docs'. Fixes: QTBUG-120485 Pick-to: 6.5 Change-Id: Iafed5c17bea5c61edc239f08045922497215fb73 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 02a556674f0b3f04de5ab09dca53ed8e86a8ba06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4b662e9a921bd409c6e03bf7f13eabd3c54a87b2)
* tests: skip tst_QGuiApplication::topLevelAt() on WaylandLiang Qi2024-01-171-0/+3
| | | | | | | | | | | | This amends 189f9873ae3f23377708fbf9880398fd6a078715 . Pick-to: 6.5 Fixes: QTBUG-121015 Change-Id: I66d2a2b0162b9c7b488af840ff5d3a881b657782 Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit d4f7d2aeabe2e778224d64a65667aa09b9e42a70) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2bcfe080d92654a1deb03380ffa20e73aae58cae)
* Make sure hicolor is searched before dash fallbacksMike Chen2024-01-172-16/+24
| | | | | | | | | | | Search full icon name from hicolor before dash fallback Fixes: QTBUG-121030 Change-Id: I3e3ee142c33466203639f32857fce3ea1946a9f7 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 0534a93ef04f38cf6dfc0d6c03827325d651a64c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7b38b5e369f45132cc83732cc5852538ad6075e8)
* Fusion style: add clip region for groupbox titleGhenady Kuznetsov2024-01-171-0/+16
| | | | | | | | | | | | | | | Fusion style is missing clip region for the title in QFusionStyle::drawComplexControl(). Without that region, the top line of the frame will be visible behind the vertically centered title. Fixes: QTBUG-121041 Change-Id: I3daf5854195e28a5ee3cb50343e2dd56e66ed940 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 9b4c35abff94a708139923a32c38a749cbdfd130) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6affa9890d0acd51b0b4d63e4ac33323e392ee48)
* QImageReader test: add test image to qrc fileChristian Ehrlicher2024-01-174-3/+18
| | | | | | | | | | | | Add the test image to the qrc to make sure the image is available no matter where the test is executed. Fixes: QTBUG-120732 Change-Id: I24de59fd88fdc2a3317c91ac28cf81fd5511455f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 076026fd60dfa399158498e42ee1b5000174c65e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b08c3af998b6ff72e68cdb1a1a02efc1882aa7ed)