aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Increase robustness of <img> tag in Text component6.9Eskil Abrahamsen Blomfeldt2025-11-202-4/+19
| | | | | | | | | | | | | | | | | | | | | | | For Text.StyledText, there was no protection against <img> tags with very large widths or heights. This could cause an application to spend a very long time processing a layout and sometimes crash if the size was too large. We reuse the internal coord limit in QPainter as our maximum size here, similar to what we do in Qt Svg for instance. For Text.RichText, there were no issues in release builds, but in debug builds, you could trigger an overflow assert when rounding the number if it exceeded INT_MAX. For this, we simply cap the width and height at INT_MAX. Fixes: QTBUG-141515 Change-Id: I4bcba16158f5f495a0de38963316effc4c46aae1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 4aaf9bf21f7cc69d73066785e254b664fcc82025) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 907c7ceb7b27586039262567273efd5ec79e6202) Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Rich text: Limit size of text objectEskil Abrahamsen Blomfeldt2025-11-191-6/+10
| | | | | | | | | | | | | | | | | When we draw a text object, we need to store this in RAM since the QTextObjectInterface is QPainter-based. This could lead to over-allocation if the text object size was set to be very large. We use the existing image IO infrastructure for making sure allocations are within reasonable (and configurable) limits. Task-number: QTBUG-141515 Change-Id: Ieae06a9e92a7bd078d22ab2314889201c2049122 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 144ce34e846b3f732bdb003f99b1f9455425416f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c3a07c99f9d2328cee4aa48a51d261d243b50d85) Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Add security header for src/qmldomSemih Yavuz2025-09-1730-0/+34
| | | | | | | | | | | | | | | There is no security critic code in qmldom. Everything remains at the default "signicant" security level. Exception is one file containing only headers marked "insignificant". QUIP: 23 Fixes: QTBUG-136197 Pick-to: 6.8 Change-Id: Ied3f8f9299b8c429e903922b815ee5db8f2d1a9e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 14785c28679923e82f9047331235b6181609bad1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 315da2e6c219402f9d74305e314f4fcc2c4249c4)
* Add security header for src/qmlformatSemih Yavuz2025-09-174-0/+4
| | | | | | | | | | | | | | There is no security critic code in qmlformat. Everything remains at the default "signicant" security level. QUIP: 23 Fixes: QTBUG-136198 Pick-to: 6.8 Change-Id: Iac1c84748bc98a9c921fc8ae895a2dcd53d01270 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b855223eda6c124a08eea50163cc475b552da7f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1d147f41031d0fb68a4658f6a1a2be9b9c37d0c6)
* QtQml: Unregister QML animation timer on deletionUlf Hermann2025-09-171-0/+2
| | | | | | | | | | | | | | | The QUnifiedTimer generally outlives the QML animation timer and needs to be notified about that latter's deletion. Otherwise it will hold a dangling pointer. Pick-to: 6.8 Fixes: QTBUG-136629 Change-Id: I52b7f2f3ae716128e4acac628ea29477fc17b677 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f94a727bd677e1869842a7edd0841aba9836a3c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 06360d905119b0f9d3f2eb979f43300940b07e95)
* QmlCompiler: Guard against disappearing arrow functionsUlf Hermann2025-09-161-38/+27
| | | | | | | | | | | | | You can override a QObject method with a JavaScript function and take away the JavaScript function later by swapping out objects. This should not crash. Fixes: QTBUG-140074 Change-Id: I85b17f4f619235024d0f1a27b4ff4128c7a57083 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 7105eb6d0d46949e235d213cfe77dda95f16c6c5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d478f1112908e10780418ddefa81b5b80bfb53d7)
* Release section item when the corresponding view item removedSanthosh Kumar2025-09-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The section item has not been removed or added to the section cache in all cases when the corresponding delegate item has been moved out of the visible area, either during flick or scroll. This happens in a case where the delegate item has been requested to be removed (as it goes out of the visible area) from the list view, but it's not released from the delegate model due to its caching mechanism. When an item is outside the visible area, releaseItem() is triggered, intended to free the item and its sections. The problem arises when releaseItem() calls QQmlInstanceModel::release(), which caches the item in the delegate model, but does not free the section. This prevents the section item from being released properly. This patch releases the section item whenever removeItem is triggered from the list view, which happens when the delegate item is moved out of the visible area. Fixes: QTBUG-137172 Pick-to: 6.8 6.5 Change-Id: Ib7e78309e076e76750b03f3238a7501563a3962a Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 5a664f08367095b1af9198e3678663f4e7c1094a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d0287165a7a3d4ecb316663918ee8808c3023d4f)
* QtQml: Empty SimpleArrayData vacant space when truncatingUlf Hermann2025-09-131-2/+7
| | | | | | | | | | | | | | Without this we effectively soft-leak the contents of any SimpleArrayData whenever we truncate it. Only when the array was either completely dropped or re-filled would the extra objects be reclaimed. Task-number: QTBUG-139025 Pick-to: 6.8 Change-Id: I88e9dc3ea8ec57c1de71b7b5417ebcfbaa75bb61 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e0f65fe66f0cc17eaf4c6c41d1b2f65ab2737e3c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 04f069e4d60921ef5422f51a2ed47b7786de61f3)
* QtQml: Check for locals in metatypes stack frame before accessing themUlf Hermann2025-09-121-7/+7
| | | | | | | | | | | | | | | ScopedStackFrame has no locals and we don't want to crash if we manage to run the GC while e.g. initializing a component. Amends commmit 2d016a2653c59f10a57dc1903b817f71d16d0622 Fixes: QTBUG-140057 Pick-to: 6.8 Change-Id: I7aeb39d6cb1f0ca0a661b8cfa2e7c159f968e224 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 024e43c68f77f6462c9ffd9e01a2b29feeefa5a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c4bf8c9f801cc78ab2b493f43a89cf86f2ea5b96)
* QtQml: Avoid double-wrapping when converting to QVariantListUlf Hermann2025-09-121-3/+17
| | | | | | | | | | | | Amends commit 1b89c1edcae68351632c2755e5408410c2ff98e3 Fixes: QTBUG-139764 Pick-to: 6.8 Change-Id: I1488527a235d74fc0352c72b9bfb69589c2f3d93 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit ce266fbcddc48edd63c4ba8c4a6f43fb2df48153) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1b33b8754573b2922ba19b143ac13f733a52630b)
* QQmlDelegateModel: Drop FINAL from some propertiesUlf Hermann2025-09-121-4/+4
| | | | | | | | | | | | | | The dynamic metaobject of QQmlDelegateModelAttached likes to override them, which produces warnings. Amends commit 9355b7173c10045f7908bf16a97ba693967517e1. Pick-to: 6.8 Change-Id: Iaf0d6627fe6c373177f7f28a750fa2baf5fa2a7e Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit a97083d5977874f66bd5abf2b1aaa1a73d2be9a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit edd434aa3a1cddb16c69d606758f923b9513db52)
* Android: append Qt Quick for Android fragments documentationRami Potinkara2025-09-112-29/+62
| | | | | | | | | | | | | | | This patch - fixes small syntax error - adds the link to Qt Academy course - add alternative way to initialize layout parameters Task-number: QTBUG-139320 Pick-to: 6.8 Change-Id: I981f097474fdbc410df30076098b71f08c070a1f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 94cb18f73c7d279d3d8bd31f07e727d12ff6e49e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7bd4e53f16f38d83f8d0db4bb86c71d32692862f)
* Fusion: give TextArea a backgroundMitch Curtis2025-09-114-26/+42
| | | | | | | | | | | | | | | This is the same background as TextField. This will cause the implicitWidth for TextArea to be the same as TextField - i.e. a bit wider - whereas before it was only as wide as the text + padding. This fixes it not being visible, especially without placeholder text. Fixes: QTBUG-139715 Change-Id: Ia736c2e282497f0a40bf8726adcc2838082ea5b4 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 006c4eedda9c42b4f47a0b9c5c11277dc341369b) (cherry picked from commit 4bfe26268019f209f8c97b01361ac87fcd2aacf6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Docs: Add brief to QtQuickViewContent class commentNicholas Bennett2025-09-111-2/+2
| | | | | | | | | | | | @since seems to have been stoppping the comment entirely. Task-number: QTBUG-139688 Pick-to: 6.8 Change-Id: Iaf0e915a2304d1f25a7d87a82b94d06988d988e7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit d0b65b954ffa65b0e38703373ab456b06f524a78) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2b540abef57e19ff2661b4b839d34af7319862b9)
* AssetDownloader: Change the module name to Qt.labs.assetdownloaderAli Kianian2025-09-117-37/+167
| | | | | | | | | | | | | | | | The module URI is renamed from Assets.Downloader to Qt.labs.assetdownloader Also a minimal documentation is added for the Qml module Task-number: QTBUG-139846 Pick-to: 6.8 Change-Id: I9b31681725dbb63ea9d8aed5474064fc217fc5ce Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit e11c3455d54e915157695863a9cba753a03877ea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 71e360ff07da675029d49db02293d214fbe7178c)
* mac style: fall back to draw ProgressBar manually on macOS Tahoe 26Richard Moe Gustavsen2025-09-104-3/+160
| | | | | | | | | | | | | | | | | | | | | On macOS Tahoe 26, the drawing of a ProgressBar using the mac style is broken. Nothing is drawn if we continue to use [NSView drawRect:], [NSView bitmapImageRepForCachingDisplayInRect:] or [CALayer renderInContext:] (and similar API) for drawing an NSProgressIndicator. This patch will therefore implement a fall back approach where we draw the ProgressBar manually when we detect that the current version of macOS is running with liquid glass support. Pick-to: 6.8 6.5 Task-number: QTBUG-138947 Task-number: QTBUG-138942 Change-Id: I26faea6e24d48bf0cb7bf2cd2b114d6ca2c2825f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 14bf8bac0dd6277710ada42a491a2af619fbb30d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e7b763373350e01c3a45823a6c8b682ee939fbe0)
* Fix Popup spacing and insets not supporting bindingsDheerendra Purohit2025-09-091-0/+5
| | | | | | | | | | | | | | Connect spacing and inset change signals from the internal popupItem to the Popup,ensuring that QML bindings and UI updates reflect property changes. Pick-to: 6.8 Fixes: QTBUG-135249 Change-Id: Iab92430406e43942c2818a3f62976ccd2fca025d Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 8ac989432063884b686af722b3ac8dd81b82c522) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fc173235b36e72756bd13dca3916c052f217f2e9)
* QmlModels: Don't notify twice for model changesUlf Hermann2025-09-081-7/+4
| | | | | | | | | | | | | | | | We can assume the QAIM already emits dataChanged() if we do setData(). This will go its regular way through our adapters and result in the relevant signals. Only if we are caching the data without an actual model to write to, we need to send the signals manually. Amends commit e9f650cad82e7eff2234cdf2d37bb9b1bb25d27d. Pick-to: 6.8 Change-Id: I961d1122588fc9b575eef1c8d916922703fb3253 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit d98d4ad9542638141a497a6933cea9f8fdf7d207) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1ed0bc7316afb5c131f2bcad8c8cab134f7e6af8)
* Refactor QAccessibleQuickItem::interface_castVolker Hilsheimer2025-09-061-15/+21
| | | | | | | | | | | | | Use a switch statement on the type rather than a chain of (nested) if- statements. The type can only have a single value, after all, and switch statements are easily optimized. Change-Id: I48c4fc0880c5615898b2456dc79830b8e2b0bdc4 Reviewed-by: Julian Greilich <j.greilich@gmx.de> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 9a805bdc397ecaf4f9579c0d9b8acce680094140) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 68873053ee849e6753acfcbea41b6d8590e48607)
* qmltyperegister: clean paths before de-duplicating themUlf Hermann2025-09-061-2/+3
| | | | | | | | | | | | | | | | Otherwise we still get duplicates if some of the paths have redundant dots and slashes. Amends commit 5d8a3c1367103a6704910432a6051445e3f01640 Pick-to: 6.8 Fixes: QTBUG-134292 Change-Id: I31f8829e9bd819b7a79e04251bc124de1d537f51 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 68534b896095b7f098e6dffe30cebd9ad7964117) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0136c7e221981eff9f74baf3fa46078efdbed379)
* Doc: Clarify PropertyChanges::explicit documentationJerome Pasion2025-09-051-2/+3
| | | | | | | | | | | | -The use of "once-off" can be problematic when translating and a more precise description is needed. Fixes: QTBUG-138886 Change-Id: Ifb240fe14752476d3a0072c0ab993fac872f096a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ca56649ae7bf79cd6f0e1715b08afbe35369fbbd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5210e391ef7b3d711d14691759484e21269231e1)
* a11y: Enable the ValueInterface for the ProgressBarJulian Greilich2025-09-051-1/+2
| | | | | | | | | | | | | Enabling the ValueInterface is necessary to use that information for a better a11y support of the ProgressBar. Task-number: QTBUG-139712 Pick-to: 6.8 Change-Id: Ia5e6c1ba4f6cada8e02b7ed4123454302b494b5d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 775b4abc5f5b676ae377fd47adfe4712e7a54e18) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b6cdcfac6cf1286630601be6891427201b4a02e2)
* Implement minimum/maximum-value also for to/from propertiesEven Oscar Andersen2025-09-041-2/+24
| | | | | | | | | | | | | | Some objects have to,from properties instead of minimumValue, maximumValue properties. Switch to to,from if minimum,maximum-Value does not exist Pick-to: 6.8 Change-Id: Ibb8e2ae3214c5fe654420a5b338d66e8fdae8c6e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 3b6701011b6889bc9e1d0863775272098ccdc58a) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
* QmlCompiler: Ensure QObjects returned to AOT-compiled code are wrappedUlf Hermann2025-09-035-10/+51
| | | | | | | | | | | | | | | If a QObject is returned from a method call, the QML engine takes ownership of it and it needs to be deleted by the garbage collector. Our generated C++ code so far did not actually take ownership of the object and thereby caused it to leak. Pick-to: 6.8 Fixes: QTBUG-138919 Change-Id: I7bd57b3612bf4b98937756e8a7a7c03aff1c9b32 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit b1c48db754c7019e0472d0baf6d71d2bd93a205b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6efdecd3612bd4a5688ac1b701590413888b3d8e)
* QtQml: Mark values on the AOT-compiled stack during gcUlf Hermann2025-09-035-30/+195
| | | | | | | | | | | | | Keep them in a special generated struct with virtual method that gets called from the GC for each frame. Pick-to: 6.8 Fixes: QTBUG-139059 Change-Id: I81bcbeab6531e174a5207d03f57d241461ae9ba3 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 2d016a2653c59f10a57dc1903b817f71d16d0622) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2356043fc45f510b17d29df6bc65b6e05cfe059a)
* QtQml: Store detached Sequence objects on the JS heapUlf Hermann2025-09-032-37/+259
| | | | | | | | | | | | | | | | | | | | | | | | While the Sequence is detached it is subject to the GC or unrelated C++ code deleting objects from its internals. Since it's then not the owning object's responsibility to track this anymore, we need to track it ourselves. The way to do it is to use the existing V4 objects. We don't have to store the sequence on the JS heap if it cannot store a QObject. Only lists of variants or pointers are affected. This independently fixes QTBUG-129972 for 6.8 where VariantAssociationObject does not exist, yet. This is because the detached sequence shown in that bug won't need to be written back to anymore in order to stay up to date. Pick-to: 6.8 Fixes: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: Ib469c6c65f2f96041e2ad2fd106f8cd60a182e13 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 9148ab4d8dd2fe4221aca1f1e2af1ad17835b6bd) (cherry picked from commit 6ef163c094cdb36ff87d4439fd7d04983e371434) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtQml: Extract method to create the inline storage for SequenceUlf Hermann2025-09-022-9/+20
| | | | | | | | | | | | | | | | | | | We will get a different kind of storage in addition. The unification of the different init() methods uncovers a bug: The storage can indeed be nullptr when querying the size later. If you construct a detached sequence from a null container, there is no reason to create the internal storage. The size is evidently 0 in that case. Fix sizeInline() to tell us as much. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I33347805fc79f81c69c3191a76ff9167186b43f0 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 706e479e3b7a71f070ef6c05f00143e1842f2ec8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 06d100df8dfbadbbe6877d7c010e28c2ab50ccf4)
* QtQml: Avoid repeated retrieval of Heap::Sequence::storagePointer()Ulf Hermann2025-09-021-4/+5
| | | | | | | | | | | | | Each of those incurs a null check. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I7bc96755629d57e1a8f0bf69e0db8de8df737665 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit c9d95333468b5aedb7d83089df40208946164c00) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d67ae3c887a7970470ee45bb78dbf5a3afcf2607)
* QtQml: Rephrase Sequence's appendInline()Ulf Hermann2025-09-021-12/+9
| | | | | | | | | | | | | | | What we actually want is append default constructed elements. Doing this the natural way avoids needless complication. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I97318b0e093a76a3d67539ea0d4e28614db4879b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit a99022e243059c564a53978120cfc9bd54289034) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8642ce05480c0ae61468f41e8c25790390aee52b)
* QtQml: Heap::Sequence::isReference() where appropriateUlf Hermann2025-09-021-6/+6
| | | | | | | | | | | | | | | | In order to determine whether we need to write back, conceptually we need to know whether the sequence is a reference. That happens to be the case if there is an object to write back to, but that's not how object() was meant to be used. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: Ie3e0e0318ecabd6f25d545d1198c07a0037b68fe Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 2aeafa46990c4211ece4ee173de69ec2b88577ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b701bf64d7ceebd64b66ebe73df48ab0cde4b6f4)
* QtQml: Inline Sequence's shiftInline into its ownly userUlf Hermann2025-09-021-30/+21
| | | | | | | | | | | | | It gets in the way if kept seperate. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I105ee78e89ce561ec27e8badc27aa94a717ace39 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 609a06be462088044cb84999d86eb5fd2fbb0e81) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 48ab3d5c66bd57eb1850eaaf361a8774fdb1b9ad)
* QtQml: Accept Heap::Sequence in doGetIndexed()Ulf Hermann2025-09-021-8/+6
| | | | | | | | | | | | | It only operates on the heap object anyway. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I7e6c232fd68893429533e1b10363ef9922a33ae7 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 64d64968956410990f4ef702a92f820a31f68a29) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e5acee1a0b2699c4050f15543da514ba0ab67317)
* QtQml: Eliminate Heap::Sequence::hasData()Ulf Hermann2025-09-022-4/+4
| | | | | | | | | | | | | We want to encapsulate the container as much as possible. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I7cf991ea7a3a879584066e7121c49e102ebadf08 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 2ce3b7bf0a2ee94593273ae897dd91e3cef21eba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6c770f0ffcad62886006ad50aa417e0d40f99fa1)
* QtQml: Inline Sequence::containerIsEqualTo into its only userUlf Hermann2025-09-022-19/+21
| | | | | | | | | | | | | We don't want to expose it from Sequence's interface. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: Iae144bb8a66a24660dd8da490edb0b4bd7cdc81e Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 476ee7f5a3b1c4ac027f8dbba35e864158c57d17) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 585b01ae37b63569602c5f4a1af6acfb6bfb11d2)
* QtQml: Inline containerDeleteIndexedProperty into its only userUlf Hermann2025-09-022-26/+24
| | | | | | | | | | | | | We don't want to expose it from Sequence's interface. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I35c37ea1da675a83a1a8d3a4af08e4301c8cd60c Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 8953a873fa279a88a0ac45ad722ac229acf7bd24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d8af0506a644235ce6eaa0dc48b9bf9d1eca1673)
* QtQml: Inline Sequence::containerPutIndex into its only userUlf Hermann2025-09-023-46/+40
| | | | | | | | | | | | | We don't want to expose it from Sequence's interface. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I12453fed0143e5e75dfc749b87b197ec328085f7 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 308305c86ad655c1194faee99f45277d22591c79) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4db6fc486e2af23c455bc2e9bc5a176f1fd9f325)
* QtQml: Inline Sequence::containerGetIndexed() into its only userUlf Hermann2025-09-022-22/+20
| | | | | | | | | | | | | We don't want to expose it from Sequence's interface. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: Ic001925c7fc1ae3be623e2fd7451f99d17899471 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit f3b565a1db51c3368988bdc35cac4bdf1929c3e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c9c9fc665be86a2545d92b2cacd2f65e918705f8)
* QtQml: Remove some methods from Sequence's public APIUlf Hermann2025-09-022-67/+50
| | | | | | | | | | | | | | | | Inline at() into its only caller, move size() further up to be visible from all callers, and make them all static functions taking a Heap::Sequence. This prevents them from being called from elsewhere and improves encapsulation. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I65c724119c0df95f2d26116b3ff6ab0a4218d91f Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 28d6d704e7212c91f5aee7cdb61d809a7de85902) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4f0affbe35085af3cc187e4c0ed9dfd0bff9e617)
* QtQml: Move Sequence's {load|store}Reference into the heap objectUlf Hermann2025-09-022-42/+58
| | | | | | | | | | | | | | It's fine to call them from Sequence and its helper classes, but it shouldn't be called from outside. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I0bfe5d813ec8fdee6c814269df069935fe304ccd Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 48fc94ac74f33481570f5426f6ea9f3277e1cfd7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 79045f75cdc81c5396a79b66aa4340dbc65c00e9)
* QtQml: Move Sequence's length accessors into SequencePrototypeUlf Hermann2025-09-022-3/+9
| | | | | | | | | | | | | We will need to befriend them. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I0d877627f2b838f2bf06a7049cd51927e13bd24d Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 1f2c87f754eb5fcedd92ab522243b4d3d953393e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ac6f40d62e707a3af87e8a08070550943a63e706)
* QtQml: Inline containerOwnPropertyKeys into its only userUlf Hermann2025-09-021-7/+2
| | | | | | | | | | | Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I2062b537c1c00908b7cc86f394d95ffdf2eabbee Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit dec8d8d6ab824538c6c119949dadfb369f9d311a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0327e2e8a4fee716b4592547d4a1d5aa60ab962d)
* QtQml: Factor out Sequence's variant data creationUlf Hermann2025-09-021-10/+10
| | | | | | | | | | | | | We want to use it in other places. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I720c4a71144ab634d70a1ec0115ca81b8030d083 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 68e35325165378a01bdf8ffddbe7450dbc6ebaba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ab3f0b248378a04a5475961f06082de0c6766852)
* QmlCompiler: Fix access to optional QVariantMapUlf Hermann2025-09-022-5/+21
| | | | | | | | | | | | | Without this, it tries to resolve the metaObject of QVariantMap, which crashes. Fixes: QTBUG-139626 Pick-to: 6.8 Change-Id: I9248f57c428810024f9983df959f475e6557576c Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit cca07aa78841f2d743f0b4d933abb0dd66f0b948) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1ef769fcb9a5e326a417206f2b309e8dbe9909a6)
* QtQml: Refactor QV4::Sequence's raw container operationsUlf Hermann2025-09-025-42/+110
| | | | | | | | | | | | | We want to encapsulate the container as well as possible. Pick-to: 6.8 Task-number: QTBUG-129972 Task-number: QTBUG-139025 Change-Id: I87841fbe9a9c9f1756eddc979b82ec8b90eec8e2 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 76dccf589d932f04af0faf00613a1951ac0dbd3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 12078c7424d20435dbb8f495c1e81680ec31ad72)
* Fix uninitialized implicitTextPadding in QQuickMenuPrivateEven Oscar Andersen2025-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by valgrind when running test test_repeater BPASS : tst_controls::Basic::Action::test_repeater() ==433792== Conditional jump or move depends on uninitialised value(s) ==433792== at 0x69C1DE2: double const& qMax<double>(double const&, double const&) (qminmax.h:21) ==433792== by 0x6B13C62: QQuickMenuPrivate::updateTextPadding() (qquickmenu.cpp:1129) ... ==433792== by 0x5999EA8: QtPrivate::QSlotObjectBase::call(QObject*, void**) (qobjectdefs_impl.h:461) ==433792== by 0x5B6411E: void doActivate<false>(QObject*, int, void**) (qobject.cpp:4314) ==433792== by 0x5B58506: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:4374) ==433792== by 0x6F6CA7E: QQuickItem::visibleChanged() (moc_qquickitem.cpp:1031) ==433792== by 0x6F5DE54: QQuickItemPrivate::setEffectiveVisibleRecur(bool) (qquickitem.cpp:6721) ==433792== ==433792== Conditional jump or move depends on uninitialised value(s) ==433792== at 0x6B13CA1: QQuickMenuPrivate::updateTextPadding() (qquickmenu.cpp:1132) ... ==433792== by 0x5999EA8: QtPrivate::QSlotObjectBase::call(QObject*, void**) (qobjectdefs_impl.h:461) ==433792== by 0x5B6411E: void doActivate<false>(QObject*, int, void**) (qobject.cpp:4314) ==433792== by 0x5B58506: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:4374) ==433792== by 0x6F6CA7E: QQuickItem::visibleChanged() (moc_qquickitem.cpp:1031) ==433792== by 0x6F5DE54: QQuickItemPrivate::setEffectiveVisibleRecur(bool) (qquickitem.cpp:6721) ==433792== by 0x6F5DD6E: QQuickItemPrivate::setEffectiveVisibleRecur(bool) (qquickitem.cpp:6711) Pick-to: 6.8 Change-Id: I2af1ff26f852a8eb3ce2426f1e8937e889aff1ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 347fd931bab8adc5a604991aba3721ebaaca873d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2ec38c005379a70e751091b7e36ab69398a22426)
* Binding: Avoid inconsistent state transitionFabian Kosmale2025-09-011-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a QML element gets destroyed, it will at some point call QQmlData::destroyed, which then sets addedToObject to false for all bindings. It will also decrement the reference count of the bindings. However, that doesn't necessarily result in the destruction of the bindings, something else might still be referencing them. Moerover, we also didn't disable the bindigs at this point. That means that the bindings would still evaluate, even after the object has been destroyed – and if the object is compleltely gone, QQmlData::wasDeleted as used in QQmlBinding::update won't save us as we only have a pointer to freed memory. We avoid this whole mess by ensuring that a binding can't be in a state where it's not attached to an object, but enabled. This is based on changes from bbf2c03226c330b934294c5e3332e341deb0b78d "Add sticky bit to QQmlAbstractBinding", and therefore the actualy change only needs to be added to older branches. We cherry-pick to dev to get the test together with the context from the commit message. Pick-to: 6.8 6.10 dev Fixes: QTBUG-139306 Change-Id: I70d063a85c005afa9795d55095e5e834c88c1985 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Reset sub-menu and content item during deletion in the quick menuSanthosh Kumar2025-08-313-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sub-menu item within the menu can have invalid reference when its created and destroyed through loader. The loader uses the incubator to create the items asynchronously (when configured asynchronous), when it becomes active and places them on the object stack. These items are cleared when the loader becomes inactive. In a case where we have the parent menu at the root, the loader places the parent menu at the bottom of the stack, and the sub-menu or any other child item within the menu is placed on top of it during its creation, and the deletion of these items happens from the top, which leads to the paren menu being deleted last. These menu items containing the sub-menu reference have not been reset when the sub-menus are deleted in this way, thus it can lead to a crash as the parent menu refers to an invalid item while resetting its state. The same happens for the contentItem within the menu. This patch ensures that the content item and sub-menu within the menu item are reset during deletion, which avoids the parent menu referring an invalid item. Fixes: QTBUG-137160 Task-number: QTBUG-139552 Pick-to: 6.8 6.5 Change-Id: Ia9688db90d6a8c8f4e4fa2aadb7e90cb3d8ea25b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 36216db956096d6cabdb28b08368dd76db92c652) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit e5f4aa242c9ca223fbb200faae215f8dcc64e5b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Make AnimatedNodes use afterSynchronizing"Inho Lee2025-08-301-2/+2
| | | | | | | | | | | | | | | This reverts commit ba7dcb65dc53dccb49ba37ef1b28ecfdccf4ad13. 'threaded' renderer doesn't emit 'afterSynchronizing' like the other renderers. Fixes: QTBUG-139309 Pick-to: 6.8 Change-Id: Iec2d9cce919d00f7fefb84db153a48d035b4fb44 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 0f534a6ce33cc96221f77669d236736d15795bdf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 09e0c8b98419be96c1418c89eb6a83cec05e5be0)
* Quick theme (iOS): include UITraitCollection headerTimur Pocheptsov2025-08-271-0/+1
| | | | | | | | | | | Include it explicitly, not relying on implicit inclusion (which gave me a compilation error about incomplete forward-declared-only class). Change-Id: Ie569d00da2a26e72e556d830ecb8ba1b4a13ffb5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 4ab1e09c0e86f02b8e9a6aaffbad732620bbb7ea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 33bd103874647673138acb661587b97f06c85ac2)
* QQuickPopup: unparent popupItem when window is set to nullMitch Curtis2025-08-272-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interacting with Popups in async Loaders caused a crash because the popup's window was null: 1 QScopedPointer<QObjectData, QScopedPointerDeleter<QObje qscopedpointer.h 112 0x7fffe8effafe 2 qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointe qtclasshelpermacros.h 137 0x7fffe8efd9c3 3 QQuickOverlay::d_func qquickoverlay_p.h 76 0x7fffe8f729d4 4 QQuickOverlayPrivate::get qquickoverlay_p_p.h 37 0x7fffe8f8c392 5 QQuickPopup::overlayEvent qquickpopup.cpp 3214 0x7fffe8f879c2 6 QQuickOverlayPrivate::handleHoverEvent qquickoverlay.cpp 192 0x7fffe8f6ee88 7 QQuickOverlay::childMouseEventFilter qquickoverlay.cpp 478 0x7fffe8f701e4 8 QQuickDeliveryAgentPrivate::sendFilteredMouseEvent qquickdeliveryagent.cpp 2897 0x7fffeb1bce04 9 QQuickDeliveryAgentPrivate::sendHoverEvent qquickdeliveryagent.cpp 1090 0x7fffeb1b25af 10 QQuickDeliveryAgentPrivate::deliverHoverEventToItem qquickdeliveryagent.cpp 1272 0x7fffeb1b2fd0 [...] We can avoid this by unparenting the popupItem, which removes it from stackingOrderPopups and hence excludes it from receiving events. The fix causes a crash in QQuickDeliveryAgentPrivate::clearFocusInScope after tst_QQuickPopup::closePolicy() finishes, because it tries to access the now null window. Add checks for that. Task-number: QTBUG-139306 Pick-to: 6.8 6.5 Change-Id: Id507e39497af3cacc832db4b23a2c27a0788dc74 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8d1a8c183356ed7fda0c45928ad7d4a398393d94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 39511014e97b28d3502aa552a61c81af906dbc56)