aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update opensource license to .frag and .vert filesv5.15.18-lts-lgpl5.15Tarja Sundqvist2025-06-06161-3220/+3220
| | | | | | | | The commercial license was updated to source files in df8183117bf244e22c96151f798a1f8f8134e960. Change-Id: Id4d5bf211cafdb56b8bda02fb7b6ea61bd8e7878 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge tag 'v5.15.18-lts' into tqtc/lts-5.15-opensourceTarja Sundqvist2025-03-3014-63/+159
|\ | | | | | | | | | | Qt 5.15.18-lts release Change-Id: I264fc86c512cc5b23b6e6279a1c086a619b07a2b
| * Doc: Add information about Felgo QML Hot Reload toolNazar Gerasymchuk2024-09-132-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new section into documentation page "Qt Quick Tools and Utilities". Add a new item into external resource to point to an official Felgo page about Felgo QML Hot Reload tool. Change-Id: I2fa2a6c03138033f75319fc278cb435b5978b85b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 96dbecc64f59589ed82040d36f7c85ea7a133434) (cherry picked from commit 409df2c9f244204c00313a115305d1515a3ce4a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8376720b1024a21d53456f898c64203d20b599fb) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 091978cea87d7ebd72b087be586b3fcdca0c73b2)
| * doc: fix reference to nonexistent DragHandler.SnapNeverPierre-Yves Siret2024-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation mentions SnapNever as a value for DragHandler SnapMode The correct value is NoSnap. Amends f228af06c2c712302ee1dcdaf761cd24504b473e Change-Id: I240d63b5ac989d37f2b7a611cab75ccd4bab2368 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 33b99d65f609d48929da1781ed3e1405db5edbe6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1073f4dd9b0d34e8a08181d66c4920ac3abaede7) (cherry picked from commit 119b08fed6889fe914d4a2825d25134cc6af7539) (cherry picked from commit 0bac8975c221b270442cd882677df840fa23422c) (cherry picked from commit dbbfae71fdd23b3746a20b18a738fdd7b6291a37)
| * Fix crash in distance field cache with some glyphsEskil Abrahamsen Blomfeldt2024-08-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of a distance field for a glyph is calculated as: w = ceil((boundingRect.width() + 2 * margin) / scale) h = ceil((boundingRect.height() + 2 * margin) / scale) In addition, the RHI-specific cache subclass adds padding on the outside of this. This was done in multiple places, both in Qt Base and Qt Declarative. If they got out of sync, then we would crash, since the distance field size is expected to match up with the allocated rect in the cache's texture. For the most part this worked since the formula was copied everywhere, but since the QDistanceField does a translate() on the path before getting the bounding rect, we could get a result which was off by a very small amount (0.0000000000000071 in this case). A qCeil() turned this into an off-by-one, and memory corruption occurred. To avoid duplicating this formula in both Qt Base and Qt Declarative, we explicitly pass in the size we expect when creating the QDistanceField. Fixes: QTBUG-124572 Change-Id: I6bb8ab4db17b43fe8ddf9db35de5b7d51ccb54de Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 2370cb0eb9f9be62472a84247a3933d176b4cef4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e180e53359accb7a11371bc951626cddaec732ef) (cherry picked from commit a1c733ff180739e08ffc887bf2ebb255b1d89a30) (cherry picked from commit a0a2f3b5828daa98fda3d23d0b53b22024b438b8) (cherry picked from commit 6600cbea3636c875e27db1ee0bcb39e2bb221766)
| * QQmlListModel: Invalidate ModelObject when necessaryUlf Hermann2024-08-134-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the object and the listmodel may be deleted during the life time of ModelObject. Don't crash when that happens. Also, fix QV4QPointer to actually name the type of the pointer it stores. Apparently this is the first time we add a QV4QPointer of something that's not a plain QObject. Task-number: QTBUG-118024 Change-Id: I208d8749bcd67970f7bfbe569eed7a472f909508 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 90c55e859ea258350da815acd3e1967d5ff54100) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aa253878fedee9bc699ec333d3c0c600e24f316f) (cherry picked from commit f7182e0124776acf0bfb1348192e09e3ccc86f0e) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit ca5bd206d49fafb813c52570a89006ed1967b17c) (cherry picked from commit 0351ad8c605b262e6192c08d3b9678b826895dfe)
| * doc: Stop telling users that DragHandler is not for DnDShawn Rutledge2024-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Link to the Drag attached property, which has been referring to a snippet using DragHandler since 5971a6faaa1124f5ef3f0b42d4ed0298cf8096a3 Task-number: QTBUG-68078 Change-Id: I2199e0e08f39ed1b136c5ea71da6631a032c4d48 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 4506b936b4dcaeb42d91e3b25789ec91d13b584e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 899b8baef71954cd3ea54e1e7432d9f070773271) (cherry picked from commit 76ecedaf64270675a1734f466b6fad4eb837b9be) (cherry picked from commit 56eacc22e31c46504005932c3747f2853ca78e1e) (cherry picked from commit 3b46bea49fa1e239935c0bc396d51388b7a85937)
| * QQuickAnimation: Fix setting running propertyAntti Määttä2024-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setRunning logic can call the setRunning recursively while changing the property. This might cause missmatch between whether the animation is actually running and the running property. If we detect recursive call, make sure that the d->running property matches with the animation job running status. Fixes: QTBUG-125224 Change-Id: I2e580d45cea7fd9cb010bc37a366def083b24abb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit cdf71ef7b62dd92d23a7485a3490527d28097db5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1ef06979983ab87f2f0b0d15d36c98d4a05deeea) (cherry picked from commit 5f16dfbe6fecc8315c9752876afc71a96c182d29) (cherry picked from commit 5e2878df39850f22240151471aa2211d54721702) Reviewed-by: Antti Määttä <antti.maatta@qt.io> (cherry picked from commit 1ffc2adeaae09097a9c53a113ff0d9b1062447c0)
| * Fix compilation with C++11Fabian Kosmale2024-05-292-5/+7
| | | | | | | | | | | | | | | | | | | | make_unique only exists in C++14, not in 11. Fix this by using qt_make_unique instead. Original-pacth-by: Nikita Medunitsa Fixes: QTBUG-125895 Change-Id: I9664fe097ba61e67c1b739ddb914ed30035a05c1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Fix documentation of List/GridView countAlbert Astals Cid2024-05-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't return the number of items in the view, it returns the number of elements in the model Change-Id: Iea479ef0fef1823718d7681ae30bb49f60025237 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit ca207f3e63f91426589f7afc775ae3fecc5e49b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a7debb56f25558cb6a9afdf8d799555aa881d3eb) (cherry picked from commit 1921468b1a64726053d3b65c34071d365e99ae5d) (cherry picked from commit 842df5c44f41131e4b33bb4293192ca489f799fd)
| * GridView: add missing properties and signals to the documentationHatem ElKharashy2024-04-161-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reuseItems, pooled(), and reused() can be used in GridView as well, since QQuickGridView and QQuickListView both inherits from QQuickItemView. Fixes: QTBUG-122250 Change-Id: Ie9875f5b3abd98f9b14134d06fbfce0286d56444 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit a35950db9523ab910feb8622f97432ee4482de83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d34f33c3fd48850a11dbdc33a9ced030faea69ba) (cherry picked from commit 677c9a0598496bdb7bb5f01f1577e53a1306e256) (cherry picked from commit 4a0b85c3b5f780a8820c954f52420beb74c0ce7a)
| * Fix heap-buffer-overflow in ESTable::removeOliver Dawes2024-04-162-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a heap-buffer-overflow issue in ESTable::remove due to an off by one error in the count provided to memmove calls. Task-number: QTBUG-123999 Change-Id: I4ee0fbc16ba8936ea921e5f1d1bb267dae0b1d5f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d3e36454830012e4fd4c538ddeab7cddbfacdc24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3241bb2e5e9a4a8c35254fc279d216b6da81780e) (cherry picked from commit 42b8085b50627fa7aa14cd6d5af7ad7fbfce85d0) (cherry-picked from commit 49ef3d89747523d75371c488bcb49b17bcaf0cfc)
| * V4: Don't call methods on nullptrUlf Hermann2024-04-091-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The root node of a sparse array can be null. Fixes: QTBUG-123596 Change-Id: I5ea7fd73aeec460082d0cf19c7fc8a01993ed1f9 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e221e1e942f58750af0a93232354a2ad35c74bcf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 590db8ac18f92c594ff7dbf4b4c020aaec546c44) (cherry picked from commit 08a318b3dc377a0a6fea88332ceebf166ac741f1) (cherry picked from commit 1a5ffffcb05effb68e33ef4b45376d2b8d9b3ff0)
* | Merge tag 'v5.15.17-lts' into tqtc/lts-5.15-opensourceTarja Sundqvist2024-11-20172-29/+6327
|\| | | | | | | | | | | Qt 5.15.17-lts release Change-Id: I85da10a6f1030e50730c7aaee4c71ae861f1ecc4
| * Flickable: don't allow dragging with mouse buttons other than leftMohammadHossein Qanbari2024-03-262-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SwipeView's page did not change to a new page when the user right-clicked on text content inside the page. This occurred because the mouse press event enabled the 'pressed' variable, indicating the beginning of a drag. Since the text item did not accept the press event, there was no need to handle the move and release events. Consequently, the 'pressed' variable remained true. If the 'pressed' variable is true, then the SwipeView's contentItem does not update the highlight item. This implies that the highlight animators will not start. Consequently, although the current index and item would change, the content item view is not updated. To fix this issue, the 'pressed' variable should not be true when the press event is not accepted. When it's a mouse event, the value of the 'pressed' variable is set to true when the left button is pressed, similar to the existing condition in the handleMoveEvent() method. Since the bug originated in 'maybeBeginDrag()', the condition is added to this method by passing the event's buttons. The testcase creates a SwipeView component with two page items that include a Label item. The test involves performing mouse and touch events on the text content. Subsequently, when the current index is changed, the testcase compares the content item to ensure it is adjusted to its position to display the current item accordingly. [ChangeLog][Quick][Flickable][Drag] Flickable is meant to be dragged (flicked) by touch events; and as a matter of legacy support, for now it can also be dragged by the left mouse button. Dragging with other mouse buttons, such as the right and middle buttons, is not allowed. Task-number: QTBUG-97252 Pick-to: 5.15 Change-Id: Ice23650dd29fe400b80efe299c9294fad62dcefb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix deadlock in long-running particle systemEskil Abrahamsen Blomfeldt2024-03-252-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2^30 was used as a "big number" sentinel and assumed to always be higher than the particle system's age. But a particle system running for a bit over 12 days will hit this limit. The result was that such particle systems would never exit the loop in recycle() and deadlock. Instead we add the check for an empty heap to the loop condition itself. Fixes: QTBUG-123111 Change-Id: I6bf9c5a27271e74f56728c0ad7bdabdd87e028b2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 9c54252914634a6756b39261b027b48b96c6ea7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fd53ed433a18a369984d87614921bbeed92997b1) (cherry picked from commit c34daa62e6efad6566fab478c3f937030f1828fb) (cherry picked from commit 2a389f2575219de6d8d264a6e244a0420ee92b87) (cherry picked from commit 4ca3d4a24a39547163046766989255f199c51b84)
| * masm: Don't crash on failed MADV_DONTNEED on LinuxAntonio Napolitano2024-02-071-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application could call mlockall(MCL_CURRENT|MCL_FUTURE) to lock all its memory for performance reasons, causing the madvise call to fail. There's no need to crash. Instead, manually zero-out the memory when decommitting. Fixes: QTBUG-120450 Change-Id: I6f1a8968853cc5e61561371bd2a435a686eaf0e4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 524d260c5c135d193e06350e48357444ddb13ddb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1ead022dfea5a6b3bed8ca80de85c20cea6c809f) (cherry picked from commit a2e0061317954fdab6f9af1ab0490944bca33873) (cherry picked from commit 5c42f57e88681be521e3d59f9e527d3bcd4d5732) (cherry picked from commit cb8ecdbf482d11c01115964e345f132a65bc365f)
| * QtQml: Clear context objects more thoroughly on destructionUlf Hermann2024-02-063-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same object can be the context object of a hierarchy of contexts. So far we would only clear one of them, leaving dangling pointers in the others. Clear all the contexts. Fixes: QTBUG-119326 Change-Id: I509f257672813866e3736b51f430f1243a8577f0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 27ba69af2f64a8b194655c9fbb276ce981075f75) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 833f4f6913835a18c37b02bd4784d62cbb4d0701) (cherry picked from commit 477c3c3c25d478caa5b833a9c64f3945b3d3a83e) (cherry picked from commit 7318fadc42e462babeca473864d12cfd033ffa42) (cherry picked from commit e1ded8e46f71c12855811d0ee1cb2c36dcf67517)
| * doc: Fix type of fontInfo.pixelSize propertyKai Uwe Broulik2024-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's int, not string. Change-Id: I68fec372d534eb173b0e3dfa52aa19b56c135515 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 6216aac9e02799fa5f1ad9e7f3f8f057ec1cd00e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8fc2ddca39940499961af9af40d04275ccc831a4) (cherry picked from commit 40f574faf507faa2ccb8978f80b78dc92f51c565) (cherry picked from commit dee6f9bb689087be23f91bd1e5c4c104aba806af)
| * QtQuick.Shapes: Mark Shape properties as readonlyIvan Tkachenko2023-12-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Expect boundingRect, which was added in Qt 6.6, so can't be cherry-picked. Change-Id: I03aeb808acdf60e207eba45e7b6761d29714d6f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit a35f65a5fa140c3ba0ddfa9093a7b7526382b22e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1e21dc33261dcf1c6f7c30d4eac7625264f98279) (cherry picked from commit 29862ca7d8377cd6ba129d1bda03109ded954588) (cherry picked from commit a1e725ecf394d64bf5ddf41569401c7e55e0b805) (cherry picked from commit 0b2ca3215e6e1b8693271f03eabe05f40b787081)
| * doc: Mention that Window.visible is false by defaultShawn Rutledge2023-12-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-120349 Change-Id: I070927d0bd8b454925b4a2ab0ddf259d47d31335 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 6efc9f1406a4f08f7a04d3bb52a4c19214d5cbb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 319e10f9a9b16ad9f8576e5efe2220eebf49291a) (cherry picked from commit 2b6ebb68b8b792ab15294e89e7fd056073cf9040) (cherry picked from commit b36d3fcf2de5531593e9825f596cfd78fbd561ed) (cherry picked from commit 553784eb21373c855c43219e09a9685cfbb76f1e)
| * Add license headers to shader sourceEskil Abrahamsen Blomfeldt2023-11-14161-0/+6279
| | | | | | | | | | | | | | | | | | | | | | Change-Id: I007eaddf0a3a9e7e6242d4e02b487fa0806c96a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 85e65e101bb7f4eecff0bdbbc6bde59ea8f6d73e) Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 960d6b5da1985552a1cba80732bb94f25340bd48) (cherry picked from commit 929bbcfde1b1a2baf10846f2131cedf4eac8f783) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 6ac454e9d303e75e79c5d138895f3db9a2c4fedc)
* | Merge tag 'v5.15.16-lts' into tqtc/lts-5.15-opensourcev5.15.16-lts-lgplTarja Sundqvist2024-11-0828-141/+282
|\| | | | | | | | | | | Qt 5.15.16-lts release Change-Id: I2892ad4097deaec565b10357ca61be10048a7c81
| * QML Debugger: Don't crash when looking up values from imported modulesUlf Hermann2023-11-016-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot look up the imports from other modules because those are stored in the CU. But we can avoid the crash. Fixes: QTBUG-117479 Change-Id: Ib5660c94dfb7ed20baedf7f71b2f175e6be042b1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 604da0a395840d7370cde1a55db460156c3a3e8c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5e34cf725637e91dbe5a7f81f51ceba23ffe435d) (cherry picked from commit 4365e9ee2fc5b510b545772bf5a14f122467682d) (cherry picked from commit e5bde5cfdb96521e6dc1dd3918d746d534739a6a) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
| * Accessibility: respect value in attached Accessible in controlsLiang Qi2023-10-063-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItemPrivate::accessibleRole is virtual and called by the framework to determine the role of an item. The default implementation checks and respects a possible Accessible attached object. However, subclasses that override the virtual don't, so the attached properties are ignored, and the class-specific implementation wins. This makes it impossible to change the role of e.g. a checkable button. To fix that, move the code respecting the attached object into a non- virtual function that the framework calls instead, and only call the virtual member if there is no attached object, or if that object is not initialized with a role. Replace calls to the virtual from the framework with calls to the non-virtual wrapper. Do this for both QQuickItem and for QQuickPopup, and adjust the logic in QQuickControl types that create an attached object and initialize it's role when accessibility becomes active. Use the non-overridable effective role value for that as well. Add a test case, and to avoid any new framework calls to the virtual, make it private. This is the qtdeclarative part for 5.15. Fixes: QTBUG-110114 Fixes: QTBUG-84858 Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry modified from commit 3c08d08ae2bbd449cc0579a1b3cb499383c7a60c) Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Avoid memory leaks in QQuickListView and tst_qqmlinstantiatorUlf Hermann2023-10-021-1/+3
| | | | | | | | | | | | Change-Id: Ieceffedb082e893b54bcda99076df3ccdeff6010 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit cf9c0f0180b65f0f2ad2cf20a35a3d11a7430927)
| * QQuickItemView: avoid leaking of highlights and animatorsUlf Hermann2023-09-294-33/+34
| | | | | | | | | | | | | | | | | | | | | | It's unclear where exactly they leak, but the tst_snippets test in quickcontrols exposes it. Turning them into unique_ptrs is the clean solution anyway. They are clearly owned. Change-Id: I076ea86639b1e0ab3f688eb982b4cee6cb908f6b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3193b20570408621d0cf9fa1665397f443d2d4d8) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Doc: Fix unqualified access in PathView exampleSze Howe Koh2023-09-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | Change-Id: Idb7e0f0dea262592ca39e8d42298bb51c91281cd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mike Trahearn <mtrahearn@topcon.com> (cherry picked from commit 033fd3aa8c7c881697d4eb8d7e143d3088ca117f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 21bc5e786e25b59f3c09a67359958453c2b3be60) (cherry picked from commit 0fa32a7dea2a5cf0bdf562818ab2fec7e1bcc35d) (cherry picked from commit 32b877a2a5285ff1adadd68e8f23b53e309f7950)
| * QQmlSequence: fix compilation with GCC12/C++20Marc Mutz2023-09-151-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The V4_OBJECT2 macro passes its first argument to Q_DISABLE_COPY and the extra template decorator then yields an invalid constructor name that previous versions of C++ and/or GCC accepted, but newer ones don't. We fixed a few of these in qtwebengine/src/3rdparty/chromium, too. Fixes: QTBUG-117018 Change-Id: I8ab1cab276b81894a7013667259ce0d2f33a4997 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
| * Context properties: Don't trigger an assert for numeric namesFabian Kosmale2023-09-124-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic in our IdentifierHash assumes that every entry is a StringOrSymbol; however, IdentifierTable::asProperyKey will convert keys that look like numbers to ArrayIndex instead. This is noramlly what we want, and not an issue, except for setContextPropery where the user can pass an arbitrary string that is not necessarily a valid identifier. In an ideal world, we would just disallow such identifiers, but for backward compatibility change the code to handle this case (avoiding a Qt internal assert). We only need to modify the QString overloads, as those are the only ones that interact with unsanitized user input. A later commit will modify setContextPropery to warn if the key is numeric. Fixes: QTBUG-115319 Change-Id: Ifc4e4d2bc99321836e6976c4cbd0c5ff687b430c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b2b90c7cf5cb5205f2c5b374f7332252205385e8) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
| * Quick Animations: Fix crashFabian Kosmale2023-09-092-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | SwipeDelegate causes the running animation job to be deleted when calling swipe.close in swipe.completed. Employ the RETURN_IF_DELETED check in more places to avoid crashes. Fixes: QTBUG-100560 Task-number: QTBUG-103223 Change-Id: I276eeaa9aed1bdb36449b322a24641fa02c4d5e4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 0238af0bd48b831d72126f2228d5913eccf67bae) Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
| * QQuickState::when: handle QJSValue properties correctlyFabian Kosmale2023-09-091-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one assigns a binding whose evaluation results in a QJSValue, care must be take to correctly convert it into a bool. Instead of directly using QVariant::value<bool>, one needs to first extract the QJSValue, and only convert it to bool afterwards. This is necessary due to the custom binding evaluation we're doing to avoid state oscillation. Amends a8c729d83979fb0b9939044d246e73b1d578e65b. Fixes: QTBUG-105000 Change-Id: I4b093b48edecf9e0f09d2b54d10c2ff527f24ac3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 2c31d25a44b1221c151681e1bb68ef78618e0166) Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
| * pixmapcache: avoid deadlock when canceling async image loadNick Shaforostov2023-09-091-2/+4
| | | | | | | | | | | | | | | | | | | | was only possible if qml_network is disabled Change-Id: If8a8addc0aa5c4c768dd7df3aa4d627f82a78059 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit da9b9a4e6e2cddd6dd1dbf2e126fc2d332bc0616) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Prevent crash when destroying asynchronous LoaderJoni Poikelin2023-09-091-0/+3
| | | | | | | | | | | | | | | | Fixes: QTBUG-86255 Change-Id: I30488b64d910a1409a43e2e98ee7ab084aec33d2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 149c1dd07b54ee0c027d94a49d52160dc4f4e2ac) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
| * Fix positioning of text decoration with some fontsVladimir Belyavsky2023-09-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually it just reverts 4db31cbd4e29cf5387f4332537f8ea9e0e9f62ae. When calculating a position for a decoration, we should just apply the decoration's offset to the line's baseline (line.y + line.ascent). The regression was introduced by 54b5287adf4f5b004fcf47840c7f2e1e561a90c1 in Qt 5.6, when we switched from prepending leading to the baseline of text and started appending it instead. Fixes: QTBUG-96700 Fixes: QTBUG-97594 Change-Id: I7f816b71859ffcb6b1c641f0c8b8e1d810bfc525 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 5d082dc9b87cfce68676f2fc1666a54afd8399b1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Doc: fix Qt Quick Test headerTopi Reinio2023-09-011-0/+1
| | | | | | | | | | | | | | | | It's QtQuickTest, not QQuickTest. Change-Id: I44a827da3a3c4125dd37f612a7258830ee8b7773 Done-with: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QML: Make notify list thread safeUlf Hermann2023-08-142-51/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep the notifyList itself alive until the QQmlData itself is deleted. This way any isSignalConnected() called while an intermediate dtor runs can safely access it. We use atomics to make the concurrent access to the pointer and the connection mask defined behavior. However, we never need anything but relaxed semantics when accessing it. We cannot wrap the connectionMask into an atomic in 5.15 since there are platforms that don't support 64bit atomic integers. However, even if it's not formally atomic, it will work in practice. Fixes: QTBUG-105090 Change-Id: I82537be86e5cc33c2a3d76ec639fcbac87eb45ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 691956654c1acab356ce704c58602cc3a99fabc3) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | Merge tag 'v5.15.15-lts' into tqtc/lts-5.15-opensourcev5.15.15-lts-lgplTarja Sundqvist2024-07-2311-28/+81
|\| | | | | | | | | | | Qt 5.15.15-lts release Change-Id: I0272e1ec4b55be362e13e36cd48f532fe4b7c770
| * QV4::ArrayData: Fix offset calculation for sort()Ulf Hermann2023-07-261-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | We cannot just sort the raw values. We have to take the offset into account. If the array wraps around the end of the allocation, we have to move it around to be contiguous. Fixes: QTBUG-58718 Change-Id: I1866b3f271d97352e250d687955af3fc54340334 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit f0b2fbcf47f00071a7f5f1a04258d451badcb81a)
| * Fix pointer delivery to child items of items with clip:trueJan Arve Sæther2023-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWindowPrivate::pointerTargets() can visit a lot of items and their handlers, before actual event delivery really starts. One optimization in place since 6adc36115f4fc658fb907ee8af3013f2609ae761 is that if an item is clipped, and the point is outside its bounds, we can be sure that it's also irrelevant to the item's children, because the parts of any children that may be under that point are clipped away and invisible. At the time that was written, QQuickItem::contains() was only doing a simple bounding-rect check. Since then, bf74a908cb0591c2adc024a6f93d566c7348c125 added containmentMask; and we should also keep in mind the precedence of the PointerHandler.margin property (currently, TapHandler.margin does not expand the sensitive area beyond a clipped Rectangle, or beyond the containmentMask either). So it seems we now need to check clipRect().contains() explicitly: a child item may be outside its parent's containmentMask, and containmentMask does not affect clipping, so one would expect to still be able to interact with the child. clipRect() is virtual, but usually returns {0, 0, width, height} (and slightly bigger in the text subclasses). Fixes: QTBUG-115179 Change-Id: I6ae8f492b99725459cdff2a89ac8508da5167102 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit f33146ed0abb67cfd82b491ba63e7279da9d95b5)
| * Fix "white line on top and left side of screen" issueMorten Sørvig2023-07-053-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduced on Android, where devices sometimes have screen sizes which are not evenly dividable by the device scale factor (see QTBUG-87334 for examples). Get the surface size for renderSceneGraph() directly from QPlatformWindow size * dpr. This avoids using the QWindow size, which might have been rounded and can yield a surface size which are off by a one or two of pixels. Also change the "logicalSize" calculation to always use the size passed to renderSceneGraph(), in order to avoid rounding errors also here. Fixes: QTBUG-87334 Change-Id: I2e094e922c1ddfc946f06e4943eba5ca9945d23a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
| * doc: Remove Calendar Example linkShawn Rutledge2023-07-041-1/+0
| | | | | | | | | | | | | | | | | | | | In 2dcad8f5c899ecec459d9e2a2c30211ee9e6c20c this was probably already wrong; it links to a widget-based example in 5.15 and 6.5 (which is removed in 6.6). Change-Id: I6bacf4f75c9aaeeb184528e0b46e0adcaf4fc9db Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a8117b10838d27a1e16c816544bb2a786b1b3b46)
| * PointerHandler: cancel all grabs when item changes sceneVolker Hilsheimer2023-06-302-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an item that has a pointer handler is taken out from a scene, then all grabs that the handler might hold need to be cancelled. Otherwise, the event delivery code might access data structures that are no longer valid, like the window of the item that the grabbing handler belongs to. The item might be removed from a scene at any point, and we can only cancel the grab of each handler that has a current event stored, which is the last event the handler received. If there is such an event, then we can cancel the grab of the handler for all event points. If the item is removed to the scene before the handler gets the event, then the event should not get delivered to the handler at all. Add a test that exercises the different scenarios. The test crashes in both cases without this change. Fixes: QTBUG-114475 Change-Id: I1022f078b02d778d8d859977c7075a4c14c9e849 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QQmlJs::MemoryPool: fix potential UB (pointer overflow)Marc Mutz2023-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A check like (p1 + s op p2) is dangerous, because p1 + s may overflow, and that would be UB, so the compiler can assume it doesn't happen and break the check. Reformulate the expression by subtracting p1 from both sides. Cast the ptrdiff_t to size_t to avoid -Wsign-compare. This is safe because _end is always ≥ _ptr. As a drive-by, remove extra parentheses. Manual conflict resolutions: - Drop the (unrelated, unintended) changes to newString(), which are unsafe with QStringRef. Change-Id: If240d685fe48196ab5ceb7ff39736b73c8997e30 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8a39f7655f4cfbc35c1886b49e2f3a9ada263e39) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * qintrusivelvist_p.h: Silence nullpointer subtraction warningFabian Kosmale2023-06-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing this class to avoid the UB here is not worth the effort. Using a pointer which is not nullptr "works", but does not change the underlying fact that only the offsetof macro is allowed this trickery. So instead of hiding the issue, we explicitly silence it for now. Since in Qt 5.15 we have an Apple-specific path to determine the clang version, and since that stops at a very old version, this backport determines the actual clang version explicitly. Change-Id: I55f456049e78f24434e3494fc94c83681e5f46c9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 83ed0e4cd90e384e6d735066e19c7f505189f98d) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QRecyclePool: fix potential UBMarc Mutz2023-06-261-6/+3
| | | | | | | | | | | | | | | | | | | | | | Return the pointer returned by placement new, not the pointer used as input to placement new. There is a subtle difference and this grey zone of the C++ standard is best avoided (keyword: std::launder()). Change-Id: I27c159cdb29a5837120f3d44aa6c95da040fd1a2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 7381110745572478ffa3c68000574bc4ccb2396c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Doc: Fix mislabelled diagram for Context2D.arc()Sze Howe Koh2023-06-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the text showed: Pi/2 -> Pi -> 3Pi/2 -> 2Pi But the curves showed: 3Pi/2 -> Pi -> Pi/2 -> 2Pi The curves are now drawn in a clockwise sequence to match the text. Change-Id: Ib8fe0c17c652a0f357d27372403440f4dd031516 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 0c615d61ba4705894c2d25c5fc7a2ed406bd5942) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.14' into ↵v5.15.14-lts-lgplTarja Sundqvist2024-05-084-17/+33
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I1931a83a9be70494c53bb0a79b3bcb01f6c84608
| * Models: Avoid crashes when deleting cache itemsUlf Hermann2023-04-251-7/+16
| | | | | | | | | | | | | | | | | | | | | | ... and also fix and enable the test that tests it. Fixes: QTBUG-91425 Change-Id: I58cf9ee29922f83fc6621f771b80ed557b31f106 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0cfdecba54e4f40468c4c9a8a6668cc1bc0eff65) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Doc: Flatten header structure for 'Import Statements'Kai Köhne2023-03-291-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Remove the top-level 'Import Types' \section2, which is redundant, as there's no second section. This makes sure that the structure of the page is better represented in the side-toc (online version), as it only lists headers of level 1 and 2. Change-Id: I8a214db6745c9d3054e1aa4277b55b911b605218 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 2f56e243b0ae49afb2ff1653f7ad0e2e047f322c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>