summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'v6.5.6-lts-lgpl' into 6.56.5Tarja Sundqvist2025-06-03391-1560/+4301
|\ | | | | | | Qt 6.5.6-lts-lgpl release
| * Revert "Update commercial SPDX-License-Identifier"v6.5.6-lts-lgplTarja Sundqvist2025-06-02168-171/+171
| | | | | | | | | | | | | | | | This reverts commit 4c16c8afb37f0b4cbcfb37d47baf6fc29e42c7b7. The revert is needed for the opensource releases which cannot contain commercial license headers. Change-Id: I0caa255093ecf406978de958cd3810bc9f80121e Reviewed-by: Jani Heikkinen <[email protected]>
| * Merge tag 'v6.5.6-lts' into tqtc/lts-6.5-opensourceTarja Sundqvist2025-03-30226-1389/+4130
| |\ | | | | | | | | | | | | | | | Qt 6.5.6-lts release Change-Id: I643db9810dfb5cb32ace8f069ebd77d43234ec8f
| | * QStringConverterICU: Pass correct pointer to callbackFabian Kosmale2024-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the pointer to the current state, not a pointer to a pointer to it. [ChangeLog][QtCore][QStringConverter] Fixed a bug involving moved QStringEncoder/QStringDecoder objects accessing invalid state. Amends 122270d6bea164e6df4357f4d4d77aacfa430470. Done-with: Marc Mutz <[email protected]> Change-Id: I70d4dc00e3e0db6cad964579662bcf6d185a4c34 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]> (cherry picked from commit 39bbfce9b675c9085ef49c9b9c52c146eca55e4a) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 7c4e1357e49baebdd2d20710fccb5604cbb36c0d)
| | * QList: give the LWG 3346 #ifdef'ery a symbolic nameMarc Mutz2024-05-022-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll need this in more places, so centralize its definition in qcompilerdetection.h. Amends 595b4e1a9b436a8190964dc41f79621400f5a6be. Change-Id: I87f84cb9ff3ad339c000604423295180176f5799 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit f4cfc21dec6319c2ae99042be6bb12922a9d336d) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit bfd565a4d300b4227b09fa1e52c18778d997d96c) (cherry picked from commit 0c8e26bbfc5cf58854124ca1f9082aa4c1dbc065)
| | * QNetworkInformation: remove redundant friend declarationMarc Mutz2024-05-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_DECLARE_PRIVATE already marks the Private as a friend of the Public class. No need to do it manually. Fixes GCC's -Wredundant-decls. Amends 0875626e22ad4e709ddf505e701a8d699559f5b4. Task-number: QTBUG-115583 Change-Id: I26f8a42e375c1377c03fe60ccccadc5d0c3b02c5 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]> (cherry picked from commit f24a03a22a863eac18a3981973f6a19aef3116f6) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 2117fc2b167807979367b5e498c02d953a5ea8d5)
| | * QDataStream::readBytes(): make the growth of the buffer geometricIvan Solovev2024-05-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The algorithm tries to allocate the memory using 1 Mb blocks. When the input data is large, this results in a lot of reallocations, which is slow and inefficient. This patch modifies the algorithm in such way that the allocation size increases at each step, resulting in geometric growth of the buffer. As all the variables in the algorithm are quint32, and the blockSize is int, we need to make sure that it does not become negative, because readBlock() is not designed to handle negative length. Note that we cannot simply "fix" the problem by converting blockSize to quint32, because that will just postpone quint32 -> int conversion until the function call. So, add an extra check to make sure that the value does not exceed INT_MAX. Change-Id: I071df68d51ba1dbd8b2eb5f94eb078a33223505f Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit a1bfac287ee5d3719646d68dc91dc8e8e4cec04e) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 44dc38ebc9fa407565ec1699bdbb1f97ffd13f1c) Reviewed-by: Marc Mutz <[email protected]>
| | * QSettings/removed_api: don't return <void expr>Marc Mutz2024-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes clazy-returning-void-expression. Amends 4cf299eb5bbdbac8484c2ee8c5afbd260dccc6d5. Change-Id: I6192deb82afe9a5ba7ddaf6203d4046f518c545a Reviewed-by: Ivan Solovev <[email protected]> (cherry picked from commit 59d24e361538e8ea03adc12785cbb73ecba61ab2) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 2ca66ab096e4464a000101c83d8a01f642ccf70e)
| | * QXmlStreamWriter: decode UTF-8 into code pointsThiago Macieira2024-04-302-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were iterating over code *units* and that yielded wrong results. The one from the bug report was simply caused by the fact that QUtf8StringView::value_type is char, which is signed on x86, so the expression: *it <= u'\x1F' was true for all non-Latin1 content. But in attempting to fix this, I needed to do the proper UTF-8 decoding, as otherwise we wouldn't catch non-Latin1 sequences and such. [ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that caused the class to fail to write UTF-8 strings with non-US-ASCII content when passed as a QUtf8StringView. Fixes: QTBUG-122241 Change-Id: I83dda2d36c904517b3c0fffd17b42bbf09a493d0 Reviewed-by: Mate Barany <[email protected]> (cherry picked from commit 94c62e322264e2e7d61193ae74ba8556a330385c) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 6bef40cb821bcaa0df62c17b7e6d19e95c9cea21)
| | * Implement aliased text rendering with DirectWriteEskil Abrahamsen Blomfeldt2024-04-302-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates aliased glyphs using the DirectWrite engine when requested. Note: There was previously a fallback to GDI to support aliased text, which ignored the hinting settings. This patch also removes that fallback. [ChangeLog][Windows] Support QFont::NoAntialias with the DirectWrite font engine. Fixes: QTBUG-97645 Change-Id: I587f56ace468cfdd57debe7bc8492a96587a4e05 Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit 421e7621faa50bf9007076d6be4e0da9514edc59) (cherry picked from commit b62b6094dd56c53f6508feaa61b43b49247d25ff) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
| | * Update Harfbuzz to 8.4.0Eskil Abrahamsen Blomfeldt2024-04-3078-647/+2497
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pick-to: 6.2 5.15 Fixes: QTBUG-124757 Change-Id: I1fa9259c2f7cb45b4dcec8956c2186735c89fb95 Reviewed-by: Volker Hilsheimer <[email protected]> (cherry picked from commit 9ecb468aec3ec0d649587007786475d9a9974a30) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 843b9921f3c0cbc37a770d32f3a9c651396d1237)
| | * SQLite: Update identified licenseKai Köhne2024-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPDX nowadays has a dedicated license identifier for SQLite. Let's use this. [ChangeLog][Third-Party Code] Change identified license for SQLite from 'Public Domain' to more accurate 'SQLite Blessing': https://spdx.org/licenses/blessing.html Pick-to: 6.2 5.15 Change-Id: I6c3378c45bc5edf498673c1b060f8e8c14d96a62 Reviewed-by: Christian Ehrlicher <[email protected]> (cherry picked from commit f0633e823796775d2c019363ca4f1cb008851402) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 0aa0d505b13362006a5c1acd2d4576929a5d7743)
| | * QEglFSKmsGbmScreen::framebufferForBufferObject: release() at the correct timeMarc Mutz2024-04-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's the gbm_bo_get_user_data() function that takes ownership of the FrameBuffer object, not the caller of the function, so release() into gbm_bo_set_user_data() not into the return. This threw Coverity off, which complained about a leak of the return value in the caller. Amends 2f0fa59d5903d4c9596ed42dcbaa9da0f77c78da, but not picking through all the refactorings the code has since seen. Coverity-Id: 444117 Change-Id: I5f058e4a42942349193eecfd8c00ec9499ef4886 Reviewed-by: Mårten Nordheim <[email protected]> (cherry picked from commit 1cfe42235c4496f68195385507dbaa553d04aee5) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 5b3143fce677dcd473543fa40b8f388dc6502840)
| | * QRhiVulkan: fix random values in pipelineCacheData() resultMarc Mutz2024-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QVkPipelineCacheDataHeader::reserved field wasn't initializaed by the code, but then memcpy()ed with the struct into the result QByteArray. At best, this contains random data, at worst, it leaks information. Initialize it to zero. Found by Coverity. Amends df0e98d4080f50de7ecacdc4cae079ab31280481. Pick-to: 6.2 Coverity-Id: 444147 Change-Id: I398c9a1e99483f2f9887d768319b20ecc11e2c86 Reviewed-by: Giuseppe D'Angelo <[email protected]> (cherry picked from commit 2913e7de5186fc4fd3576167304c214d30f78d2e) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit bed03c10be8a93debfa0ee00c544efb2d966b742) (cherry picked from commit 1d54d0252c7647a948415ac7780305b690a7ec3b)
| | * QDebug: fix copy-instead-of-move issuesMarc Mutz2024-04-281-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity correctly complains that we're copying the QDebug object when calling print*Container() when we could have moved it into the helper. So do move it. Coverity-Id: 406803 Coverity-Id: 407406 Coverity-Id: 408523 Coverity-Id: 408562 Coverity-Id: 418431 Coverity-Id: 424788 Coverity-Id: 425106 Coverity-Id: 426537 Coverity-Id: 427163 Coverity-Id: 428925 Coverity-Id: 444463 Change-Id: Ic80247f315a09fffe9363577dff1d1c781859304 Reviewed-by: Giuseppe D'Angelo <[email protected]> (cherry picked from commit 7e8196510df88bc956492593c27da1af7b31b8ef) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit aecc4b1aba48636568043b985eeb72023b8a9e0e)
| | * androiddeplyqt: fix more missing pclose() on early returnsMarc Mutz2024-04-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by Coverity. This code predates the move of androiddeployqt to qtbase. Pick-to: 6.2 5.15 Coverity-Id: 378442 Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc Reviewed-by: BogDan Vatra <[email protected]> (cherry picked from commit db240d99cffbc3af2eb39a5f7d48e68e57b85271) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 76807bdfb754a1551a2ecf9977f4e08f944ff220)
| | * androiddeplyqt: fix missing pclose() on early returnMarc Mutz2024-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by Coverity. Amends 5bb178c479a247720fbc3fbb7f06a32b725193ac. Pick-to: 6.2 5.15 Coverity-Id: 378357 Change-Id: I8839280ce15d8e7d9e1f4024ca796c2d8b4ed930 Reviewed-by: BogDan Vatra <[email protected]> (cherry picked from commit c64b30129d7c6c7f99b6abc3f42d32fb61e27f76) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 950123bfbc063998e6019d427d3dde600e7d51dd)
| | * QCocoaMenu: fix crash when app quits while menu is openMitch Curtis2024-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following QML code: import QtQuick import QtQuick.Controls ApplicationWindow { visible: true Menu { id: menu MenuItem { text: "Some action" } } TapHandler { acceptedButtons: Qt.RightButton onTapped: { exitAppTimer.start() menu.open() } } Timer { id: exitAppTimer interval: 1000 onTriggered: Qt.quit() } } With the new native Qt Quick Menu, this will create a native menu on platforms like macOS. When the user right clicks on the window, a timer is started and a native menu opened. After 1 second, Qt.quit() is called while the menu is still open. As popUpContextMenu is blocking, when the menu is finally closed (by user interaction), control returns to QCocoaMenu::showPopup, but the QCocoaWindow has since been destroyed. Account for this by storing the window in a QPointer. It's not possible to test this as native menus can't be auto-tested. Fixes: QTBUG-124551 Change-Id: I14a97073f350c38828b3e16bb157439aeeeb6529 Reviewed-by: Richard Moe Gustavsen <[email protected]> (cherry picked from commit 468cb035efe4890c388069eb373a7ae8ef178146) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit bab177366140df8afe3c0eafef4616bbfc3180af)
| | * syncqt: remove dead codeMarc Mutz2024-04-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Either the code in the try {} block - doesn't throw, then the return within the try {} block exits the function, or it - throws fileystem_error, then we rethrow in the catch, or it - throws any other exception, then we leave the function by exception In no case can control reach the trailing 'return {}'. Found by Coverity. Amends 7aecb189d544613ad13c7e7d1207bd7767225a71. Coverity-Id: 444466 Change-Id: I1c1bf752453076724c2fa9367ea5309e741d84ac Reviewed-by: Alexey Edelev <[email protected]> (cherry picked from commit 73d00d05477fb6da25164b37135bb19a300bea8d) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 406c0d3464df1f0427ad2605ed34d9d0b0c022de)
| | * QSignalSpy: use NSDMI for m_waitingMarc Mutz2024-04-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One step closer to DRYing the ctors. Task-number: QTBUG-123544 Change-Id: Iff73fe70e3d2de52548d10b2f38a7ba2bd7029cd Reviewed-by: Mårten Nordheim <[email protected]> (cherry picked from commit b97bcdd7743485418c26cf37d6ed6ea31ce94376) (cherry picked from commit b1313102737204f632d459a9924a0ea130970a7d) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
| | * QDBusUtil::isValidBusName(): remove an impossible condition guardMarc Mutz2024-04-271-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStringView::split() only returns an empty container if a) the haystack is empty and b) SkipEmptyParts is in effect. Neither is the case here: We use the implicit default of KeepEmptyParts, and we've already checked that the haystack isn't empty in the first line of the function. So the result of split() can never be empty here. Remove the check to avoid confusing more readers than just yours truly. Amends the start of the public history. Change-Id: I423e747ae4de0708d063a6bb2befd625dbd5c591 Reviewed-by: Ivan Solovev <[email protected]> (cherry picked from commit 05f9996bbf45fc90e49ea8c1679fa25201555860) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 60ee856adbf7af7e012c16385a84c68f43e347bd) (cherry picked from commit c9ca781b25093dcaecc9095b1fb2a5f343b4b5b5)
| | * [windeployqt] Copy v8 context snapshotAnu Aliyas2024-04-261-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | - Copy v8 context snapshot while creating package with windeployqt Fixes: QTBUG-116777 Change-Id: I707e1d147ebf0ba5ee63dd25218e23ac850efe45 Reviewed-by: Oliver Wolff <[email protected]>
| | * Doc: don't use deprecated function in QMenu snippetsChristian Ehrlicher2024-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMouseEvent::globalPos() is deprecated - replace it with QMouseEvent::globalPosition().toPoint() Fixes: QTBUG-124343 Change-Id: I6f862a9a640da11d756dae58ffae8c6d7fc24e02 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Safiyyah Moosa <[email protected]> (cherry picked from commit 001d88ae38435a2d108178c5d396839986985bc4) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 67372f31aed48f355f14df3068074ed3d1f2166f)
| | * QStyleSheetStyle: Don't try to load a pixmap with an empty filenameChristian Ehrlicher2024-04-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleSheetStyle::loadPixmap() might be called with an empty filename but then it should not try to load a file with an empty filename. Fixes: QTBUG-123839 Change-Id: Ie01e9f75f025650b0802736bb589ebdc48e93696 Reviewed-by: Volker Hilsheimer <[email protected]> (cherry picked from commit b773a4f5836b39e363899ad48a9f469e7f18db1a) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit acff474a2b27b6224d9716a7f6d642b92691d6a8)
| | * QMovie: fix regression in frame delaysEirik Aavitsland2024-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent addition of support for multi-frame (non-animation) formats had an unwanted side effect of sometimes calling QImageReader::nextImageDelay() when the reader is at a different frame than intended. Fix by effectively reverting to the previous call pattern. Fixes: QTBUG-124227 Change-Id: I735f8d67afb17bd4c77f9b4507a71796b7d66958 Reviewed-by: Paul Olav Tvete <[email protected]> (cherry picked from commit 5f0ed0ac0ddffd3779fae0db956df8d48d629f92) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 3516762d73b0325a21b344367da51e29a89a1dbd)
| | * widgets: Invalidate RHI swapchain when window moves to new top levelTor Arne Vestbø2024-04-202-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QWidget with an associated RHI swapchain (via its QWindow) is moved to a different top level window, that top level window has its own backing store, and QBackingStoreRhiSupport, which doesn't know anything about the fact that the window already has an associated swap chain in the original top level window's QBackingStoreRhiSupport. As having multiple swap chains for the same window is not supported on all RHI backends (Vulkan and DX in particular), we need to throw away the swap chain when detecting that the window is moved to a new top level. We do this by hooking into the existing WindowAboutToChangeInternal event delivery to renderToTexture children, which now delivers the event both to renderToTexture QWidget children as well as QWindows in the hierarchy. The condition of when to deliver the event has been updated to reflect whether the top level uses RHI for flushing, instead of only including renderToTexture children, as the former also includes setting QT_WIDGETS_RHI=1 explicitly. The event is then caught by QBackingStoreRhiSupportWindowWatcher, and handled the same way as for SurfaceAboutToBeDestroyed. Renaming qSendWindowChangeToTextureChildrenRecursively would make sense at this point, but to make cherry-picks easier we keep the current name for now. Fixes: QTBUG-120276 Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Laszlo Agocs <[email protected]> (cherry picked from commit 1bd755465efa27294362925f55306f88f1800936) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 81581819c79c9195b0a732cc3ba99a67a18c06f0) Reviewed-by: Tor Arne Vestbø <[email protected]>
| | * macOS: Send key press as QKeyEvent if input context doesn't consume itTor Arne Vestbø2024-04-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If IM is enabled we send key events through the macOS text input system, and we do this for all key pressed, including the ones with modifiers pressed. The latter allows the input method to respond to shortcut key combinations to switch its own mode or do more advanced operations on the text. We were relying on the IM to call doCommandBySelector with a noop selector if the shortcut didn't match any of its own internal key sequences, but this fails for key events with more than one modifier pressed. Instead of using [NSView interpretKeyEvents:] to pass the key event to the system IM we now go directly to the NSInputContext, which the former method is just a wrapper for. This allows us to use the result of [NSInputContext handleEvent:] to determine if the system IM consumed the event or not. For key events with multiple modifiers this will be false, which we interpret to send the event as a regular QKeyEvent instead. Fixes: QTBUG-123848 Fixes: QTBUG-106516 Pick-to: 6.2 Change-Id: I14a43c2029149514515dd9ece881aed3f6500a4e Reviewed-by: Volker Hilsheimer <[email protected]> (cherry picked from commit 085d5db90dd4c148fe5dea6a3435166f6bdeedac) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 79cb221f96713dade3118c71bf78b30705a7446f)
| | * Draw list bullets/numbers with CSS text color, not palette colorShawn Rutledge2024-04-191-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CSS has been used to customize the text color, render the bullet with the same color. This is consistent with web browsers, and with Qt Quick rendering. In QTextDocumentLayoutPrivate::drawListItem(), the pen color is the text color, so use it instead of brush color. Add a baseline test for lancelot: the background and general text are customized, then some list items are customized further, and some of them have colored text spans. Repeat with different styles of numbered and bullet lists and checklists. Fixes: QTBUG-2188 Task-number: QTBUG-213 Task-number: QTBUG-57833 Change-Id: I71e84d00172e4b37aef57c8badd2ec43c10113d9 Reviewed-by: Sami Shalayel <[email protected]> (cherry picked from commit 7f48c79627663f0777df9c10d06202aea5bedac3) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 2d7972e05950e822ded11a09b79be4db92ce1692)
| | * SQLite: Update SQLite to v3.45.3Christian Ehrlicher2024-04-173-47/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Updated SQLite to v3.45.3 Pick-to: 6.2 5.15 Change-Id: I8a58699f10cada8b33d47c3032861fa6ef1b6cc9 Reviewed-by: Kai Köhne <[email protected]> (cherry picked from commit b6624877c61e8eef45956d62ee9229dc52ffa89a) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 74563f95ae4377bce9563b1c4ddb3c7b38c69f9a)
| | * Revert "Don't do font merging for PUA characters"Eskil Abrahamsen Blomfeldt2024-04-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc33fea999365c36ed446eee0db0d59d94be306b. The change caused issues with system-wide PUA fallbacks on platforms where this is supported. It needs to be replaced by an approach which still falls back, but only for fonts which are explicitly categorized as PUA fallbacks. Task-number: QTBUG-110502 Change-Id: I985a1f8076645593c50e81759872b4227d0fcd0d Reviewed-by: Tor Arne Vestbø <[email protected]> (cherry picked from commit 4913511d3bf8ec7838f80fbfe92c0fe900b2f003) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 5b3fd5e9d217a1ed7581e1e08bec2ab9641e7bcd) Reviewed-by: Mårten Nordheim <[email protected]>
| | * QTextLayout: keep strong reference on font engine in a layout loopVladimir Belyavsky2024-04-161-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is speculative fix for the crashes in QTextLine::layout_helper() we're observing on users side. The possible reason is in that fontEngine and previousGlyphFontEngine, which are stored in LBH, became invalid during the layout cycle (destroyed by trimming font cache?). To prevent this we need to handle font engine's ref-counter gracefully, so just wrap them into QExplicitlySharedDataPointer. As a drive-by change, use in-class initialization for LBH members. Task-number: QTBUG-117500 Pick-to: 6.2 5.15 Change-Id: I6987a2b5618bb4ba8762f2ef01b4ce0dd60cb232 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]> (cherry picked from commit d914c58c7ee07f0d7598cee3491b815bd8d8bc23) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 363878499c845a40211d1ea5e5e2e57121a1f9a1)
| | * print: windows: Fix setting page orientationJarkko Koivikko2024-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when PPK_Orientation property was set, updateMetrics() was called before doReinit() and updateMetrics() used physical dimensions of the DC initialized with previous orientation, which resulted in miscalculation of m_paintRectPixels, origin_x and origin_y variables. This bug manifested itself as all sorts of weird behavior, such as unexpected margins when changing paper size and printing beyond paper margins. Change-Id: I2d0e104bee11165e3541e7f3119b29edd4b882c8 Reviewed-by: Oliver Wolff <[email protected]> (cherry picked from commit 223b92490edfd4e3e75e634831258c54d5b0a501) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit ff5bda7e115c304d44ae1c12b1268cfc0894ce55)
| | * QCborMap::ConstIterator and Iterator: Add missing destructorRym Bouabid2024-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Axivion (SV403 and SV404) points out, based on rule of three, the lack of destructors for ConstIterator and Iterator. So add them. Task-number: QTBUG-122619 Change-Id: I4d4abf9be8be529492bf13069052ae4a8d8a90de Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit b9cb2f30f1568e6cbf8e13d61501babcb90d46b2) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 61885e26e42b766a4db3d67e9b188e601ce8d830)
| | * QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUGMårten Nordheim2024-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because there is no other way to stop it from printing the output. Change-Id: Ie6dcb393351f50691366849ba85d60e2e186f9fb Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit 1dd89bfb04515bd2e431f8915256a417d622288f) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit d059d5c3cb9dddcc55cf5291cd1b7222169d105b)
| | * QStringTokenizer: Add a missing includeMartin Storsjö2024-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header uses std::forward_iterator_tag, which requires including the <iterator> header. This fixes building with libc++ with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES enabled. Pick-to: 6.2 Change-Id: Id2ce97e158c87dab1efe30e54a93f0bc9351de5a Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]> (cherry picked from commit aa896ca9f51252b6d01766e19a03e41bd49857f3) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 3162f7a6ad5b6ff1f095e3aff62282191dc24572)
| | * QSystemLocale(): disable copy and moveEdward Welbourne2024-04-112-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Axivion (SV546) points out (based on a clazy "rule of three" that might be rule of five by now) the lack of move and copy assignment and construction. We don't want those anyway, so tell the compiler not to create them. Task-number: QTBUG-122619 Change-Id: Ie951a2c3d60d76ad3448310d3f9bbda22190015b Reviewed-by: Giuseppe D'Angelo <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit 21ef6d930ad3eb2fb435cd601692cb5cc1726bd8) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit a07c718c17df4d376c4fcf5caf67e086a4f0bd53)
| | * Pass QVariant to QSystemLocale::query() as rvalue referenceEdward Welbourne2024-04-117-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVariant is rather big for passing by value; and no caller has any further use for the QVariant it's passing in. File qlocale_wasm.cpp was added after 6.5, so drop its change. Task-number: QTBUG-122619 Change-Id: I2751745e715aacfa8982ac97b4ae777fde5e88de Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit b68f1009187fee473f4c6477ec64300650e29904) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 644eca89ed288adbcd7a4a604797be567796711d) Reviewed-by: Mårten Nordheim <[email protected]>
| | * Revert "wasm: Proxy emscripten_fetch() to the main thread"Piotr Wierciński2024-04-112-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f2f2b6ef18907a76461b54e110618e7840971fa7. Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there. Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]> (cherry picked from commit 157c9eef48916c3e11f43ffb0fe8e8030bed8d06) Reviewed-by: Piotr Wierciński <[email protected]> (cherry picked from commit bc9d2230d85a694a9a4a2b358e4a299960a51c2a) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
| | * QLocale: pass 64-bit LanguageCodeEntry by value, not const refEdward Welbourne2024-04-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probably makes no difference, since it's all in lambdas being passed to a standard algorithm, but the static analyser noticed this would be cleaner. Task-number: QTBUG-122619 Change-Id: I23093254e4857131b7be87aeff1e7ba79ea2b674 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit e1da249be602322c3e4b84ba23748c1c1c8db888) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 4c25cb76eb224bbd315dc5e0c7bf18644205a294)
| | * Pass trivially-copyable types by value, not by const refEdward Welbourne2024-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LikelyPair and QLocaleId types are small enough to pass by value. Task-number: QTBUG-122619 Change-Id: I1502efcf69ac82d9c49b673975502882c59a4fd0 Reviewed-by: Thiago Macieira <[email protected]> (cherry picked from commit 738914e787c5a2de57f40753b665e2a49f9536d3) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 84d5754a816add82867c49fb6a3d15287029d1ed)
| | * QOCICols: fix warning for -Wdangling-referenceDennis Oberst2024-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. by playing it safe and taking the QVariant by copy Change-Id: I24e0507a912388b7fb17e838a22e8d4c449bcf5b Reviewed-by: Volker Hilsheimer <[email protected]> (cherry picked from commit d4f2a5aa401c14dd8dc122bbf25fce9cd7f41cba) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 50c49a6979ccf7096bb1b7d8a93d0c495ff12ec1)
| | * doc: Remove deprecation of the supported QTouchEvent ctorShawn Rutledge2024-04-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 111115bf8862b7cd1197c2ef8a4b475c882776d4 Change-Id: Ibc557fdde9c894a3a58bb58835e11be9180e6e6d Pick-to: 6.2 Reviewed-by: Paul Olav Tvete <[email protected]> (cherry picked from commit 14610fb1749a22abbd203f42e3edb3f4425cb215) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit ab597b84b3a6a3d3d52d06582b412b31a8f4f143)
| | * StyleSheet: respect a font weight set for header sectionsVolker Hilsheimer2024-04-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCommonStyle sets the font for a selected header section to bold. This overrides the font weight a calling style might already have set, e.g. when a style sheet is applied to explicitly set a weight for a checked header section: QHeaderView::section:checked { font-size: 20px font-weight: normal } Since setting the weight on a font sets the respective resolve-mask bit, we can avoid overwriting a weight that is already set explicitly. Add baseline test coverage using a QTableWidget. Fixes: QTBUG-122180 Change-Id: I8c6279ad2fd8c5718ebea26e27c64ae823625748 Reviewed-by: Axel Spoerl <[email protected]> (cherry picked from commit 74e0ed217fdec8e32227f9f845eccac7f1552297) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 294a2646db4412bf9eb65a7c365bb0398d2747c5)
| | * QTypeInfo: Add a missing includeMartin Storsjö2024-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header uses std::is_trivial_v, which requires including the <type_traits> header. When building with PCH enabled (which is the default), this dependency does get satisfied via the PCH, so no issue is visible. This fixes building with recent version of libc++ when configured with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES (which removes unnecessary transitive dependencies between the libc++ headers, a configuration which may become the default in the future), with PCH disabled. Pick-to: 6.2 Change-Id: I5e3ae20e366ed3028b1156cee05bcf2908d6e845 Reviewed-by: Giuseppe D'Angelo <[email protected]> (cherry picked from commit adb49d65e0774fa6be0b0d9d490c6f1fc5066a1b) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit efea1f981f44d079e2a4abc9ff228ade069f42a8)
| | * Decouple rate-limiting of paint-on-screen widgets from top level widgetTor Arne Vestbø2024-04-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of eacd58d4e78e7238ba5fcca90ba960aaf3ebd263, a mechanism was added to prevent posting redundant UpdateRequest events to the top level widget, managed by QWidgetRepaintManager. The mechanism relied on a boolean that was set when posting an update request event, and reset when processing the event for the top level widget, as part of QWidgetRepaintManager::sync(). However, for paint-on-screen widgets, we don't post an update request to the top level, we post it to the paint-on-screen widget directly. And when processing that event, we don't paint the widget though the normal QWidgetRepaintManager machinery, but instead call the paint event via QWidgetPrivate::paintOnScreen(). As a result, an update() on a paint-on-screen widget would result in never receiving updates for non-paint-on-screen widgets, as we assumed there was no reason to send further update requests. We could fix this by clearing the updateRequestSent flag as part of the paintOnScreen() code path, but that's incorrect as the flag represents whether the top level QWidgetRepaintManager needs an update request event or not, and would lead to missed updates to normal widgets until the paint-on-screen widget finishes its update. Instead, we only set updateRequestSent if we're posting update requests for non-paint-on-screen widgets, which in practice means the top level widget. The paint on screen logic in QWidgetRepaintManager::markDirty still takes care of rate-limiting the update requests to the paint-on-screen widget, by comparing the dirty area of the widget. There is definite room for improvement here, especially in the direction of handling update requests via QWindow::requestUpdate instead of manually posted events, but for now this will have to do. Fixes: QTBUG-80167 Pick-to: 6.2 5.15 Change-Id: Ib5685de7ca2fd7cd7883a25bb7bc0255ea242d30 Reviewed-by: Richard Moe Gustavsen <[email protected]> (cherry picked from commit 697e1b0397259959e3f555296f87a0d9d923e4b5) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit c198f7124cfb043ee1f04b13fc857bf3d5081bcd) (cherry picked from commit 4e3c55e10da297e38ba45a35d7d0506b9f3bf989)
| | * macOS: Remove popup mouse and app activation monitors on app shutdownTor Arne Vestbø2024-04-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're not guaranteed to get into any of the code paths that call removePopupMonitor() before the app goes away. In a plugin-scenario, this may cause crashes when our monitor then gets a callback and we try to access QGuiApplicationPrivate::instance(). Pick-to: 6.2 Fixes: QTBUG-123959 Change-Id: I287b91ff261a8aab74adbbad8c63a042daf944d5 Reviewed-by: Doris Verria <[email protected]> (cherry picked from commit 8bb93bf8ee59b3e31e7353d6683dbb0aa890f7e7) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit fa92448dd60b8b0fded3abdc933308dd03432c6c) (cherry picked from commit 52770791a5ef9163a0a70ab2b36cfdd54ccae6ed)
| | * iOS: Use UIWindow bounds for fullscreen/maximized geometry on macOSTor Arne Vestbø2024-04-031-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In modern iPad apps, windows can be moved between screens, just like regular macOS apps, but we don't reflect this as changes to the QWindow's screen, meaning the screen() is not reliable input when computing a window's full screen or maximized geometry. In addition, when running iOS apps on macOS as "Designed for iPad", the system will scale the UI down by 77%, to better match metrics (fonts, sizes) to the macOS environment. Classes like UIView and UIWindow are oblivious to this scaling, and will think they are larger than what they really are on the screen. However, UIScreen, for some reason, reflects the actual screen size, instead of taking part in the "inflated" view of the world. As a result, even if screen() would reflect the correct screen the window is on, we can't use the screen geometry for clamping the window geometry, as the two have separate coordinate systems. We could scale up the QScreen geometry accordingly to work around this, but we don't know if the UIScreen behavior is a bug or not, so instead we skip the screen() as input and use the UIWindow bounds directly. Task-number: QTBUG-121781 Fixes: QTBUG-106709 Change-Id: Ie734fc477b37a7e39e6fb16d7738d3f69731a975 Reviewed-by: Amr Elsayed <[email protected]> Reviewed-by: Doris Verria <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]> (cherry picked from commit 2da738f03589b2bb53e921b5fec347bdd6b68b16) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 5195c6683d6d1c262227f67c9954e80c21f54156) (cherry picked from commit 0b70ca278a2c3b3005ab4d4601f6b5d6abbee539)
| | * QMainWindowLayout: rewrite validateToolBarArea() to return by valueMarc Mutz2024-03-301-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity complains that QToolBarAreaLayout's addToolBarBreak(QInternal::DockPosition) could access QToolBarAreaLayout::docks out of bounds if passed QInternal::DockCount. That is correct, but a valid pos seems to be a precondition for this function, judging from its sister functions, e.g. addToolBar(DockPosition, .) or insertItem(DockPosition, .), which also don't validate `pos`. All in-module callers of addToolBarBreak() only pass valid positions, and use validateToolBarArea() to ensure that. So it seems that Coverity doesn't grok the pass-by-in/out -parameter used by that function. That, or it doesn't track back far enough. Before attempting more drastic measures, first try rewriting the function to return-by-value instead, and see what Coverity has to say afterwards. As a drive-by, make validateToolBarArea() constexpr. Pick-to: 6.2 5.15 Coverity-Id: 444141 Coverity-Id: 444135 Change-Id: I5fcc664c3cea608429036cad75c37f5c38059733 Reviewed-by: Richard Moe Gustavsen <[email protected]> (cherry picked from commit 19aeb431cf1bd4e864356ff02db6337dc59b2835) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 59072e9916278db1fc104656ba9fbf3e65317367) (cherry picked from commit 2255d843969536901823b98ff8ca9dfb9450b05b)
| | * QMenu: clear popup screen after exec()Axel Spoerl2024-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8cd7a3d4723ca414f3fe544704a0ccb752da94b8 remembered the current screen in QMenuPrivate::popupScreen. This QPointer member is not reset, after QMenu:exec(), which makes a re-used menu remember the wrong screen, if its next usage happens on another screen. Reset the member variable at the end of QMenuPrivate::exec(). This amends 8cd7a3d4723ca414f3fe544704a0ccb752da94b8. Fixes: QTBUG-118434 Change-Id: I7457ca72166346f01cf71b2706ebc20ecd71173c Reviewed-by: Friedemann Kleint <[email protected]> (cherry picked from commit 7aedcdefb81004f57e664409c0fb9f9b371ff4f0) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 137706fc31b0018b69b59827176cfd06e983c39b) (cherry picked from commit a158a1807edafb1e1711d17e09d5b0e4e7d8a6f3)
| | * Add the note about data size to QByteArray::operator=(const char*)Alexey Edelev2024-03-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the note about the way the str size is determined when using QByteArray::operator=(const char*). Change-Id: I39b2d0fc2967832622fbf0c11b3ff6c7ff99b8f2 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Leena Miettinen <[email protected]> (cherry picked from commit 32e2386b157effa5f253ffd669ed52471863823b) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit 41ecbdf4670171f1d9f68fb6ccd74ef4b05368cd) (cherry picked from commit 1fc5527e2d9319e23dd7f419de216d60e90ac2c4)