aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SelectionRectangle: ensure we remove or update selection handles if ↵6.6Richard Moe Gustavsen2024-04-056-23/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | selection changes If you make a selection with SelectionRectangle and then resize a row, the selection handles will not move to the resized position. Likewise, if you do a selection, but then clear the selection by interacting with the ItemSelectionModel directly, the selection handles will not be updated to reflect the changes. To fix this bug, this patch will add a callback from TableView to SelectionRectangle that can be used to notify when changes are done outside of SelectionRectangle. This especially allows us to: - Remove the selection handles if the active selection is cleared or changed programatically (or anyway not by SelectionRectangle). - Keep the selection handles, and update their position, when rows or columns are merely resized. This change also allows us to clean up qquickselectionrectangle.cpp a bit, and remove e.g a now superfluous tap handler listener. Task-number: QTBUG-121143 Pick-to: 6.5 Change-Id: Id170520d49bc92c0bb9d16deaba741cab6f5c553 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit f0fbedbe69532d9f5d1bc622f0b5b1ed16f23f2b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7adfb01943b8681a51d6c01fed6d06b864f6d010) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix heap-buffer-overflow in ESTable::removeOliver Dawes2024-04-055-17/+82
| | | | | | | | | | | | | | 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 Pick-to: 6.5 6.2 5.15 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)
* Controls: Bypass bindings when setting x and y in resizeBackgroundOlivier De Cannière2024-04-042-2/+42
| | | | | | | | | | | | Using setX() and setY() instead can remove the binding for them. Fixes: QTBUG-120033 Pick-to: 6.5 6.2 Change-Id: I77fc5360b2d10436b5e258b5f0ceb96b949eccbe Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit bb7ba7667b4cf3565aa1849d08cc71b9ac011e77) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ac17f948cdb46e0fe900c72af35fc3ac84e29000)
* qmltest: add a 'modifiers' argument to mouseMove()Richard Moe Gustavsen2024-04-033-9/+11
| | | | | | | | | | | | | | | | | | | | As it stood, TestCase::mouseMove() didn't take a 'modifier' argument. All the other mouse functions do that, including mouseDrag(). But even for mouseDrag, the modifier argument was only applied to mousePress() and mouseRelease(), but not to the in-between mouse moves. This patch will implement support for providing a modifier argument also to mouseMove(). This is needed in order to test API that distinguishes a normal drag from a ctrl+drag, like e.g SelectionRectangle. Pick-to: 6.5 Change-Id: Idd800eda4b5b4fd4e9cda94155ca4ec36e935d13 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 92f39a3919375af7e0eeaa31d010fc7fde7f6c4f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7a9478f69446b67550c41dd6340891b456074cb4)
* QQmlEngine: Set translationsDirectory in loadFromModuleOlivier De Cannière2024-04-0315-26/+270
| | | | | | | | | | | | | | In the process, loadFromModule had to be split in two parts. The type resolution has to happen so that the translationDirectory can be set and the translations have to be loaded before loading the actual module. Pick-to: 6.5 Fixes: QTBUG-116589 Change-Id: Ife7999f418ba35bfb0eed9050198e5a886fa74ae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 986b4d155bd39836b1aa3c3da332ef07d2a949fd) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8206c3d86c27327e31bcefaef6a6606e207c9b18)
* Small fixes in tst_spinbox.qmlMatthias Rauter2024-04-021-8/+4
| | | | | | | | | | | | | Ammends cf15ba9b085ac783fd3315f1b103c012947cb7db This patch addresses the comments that were posted in codereview but not included in the previous patch before staging. Change-Id: I5ad25213824d39459110cee1368eef9cfc8650c5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 580c431fb07c18cbfb85a1a327cb6b27e5803440) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 34f7cc12b99ab858318bbf37a6c1acfd0b0247c1)
* Mark MultiEffect itemRect properly as readonlyKaj Grönholm2024-04-021-0/+1
| | | | | | | | | Change-Id: Id3a7031959f9b386b919d0a00c02e7bdcadf8a92 Reviewed-by: <peter.schneider@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> (cherry picked from commit e3b1d3532b1f33bb8e8e6435df8b159e04c34068) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a2d96ea925a708cdaf49043ab94dbe508dcc70b1)
* QQuickSelectionRectangle: Fix crash when target is nullNicolas Fella2024-04-021-1/+1
| | | | | | | | Change-Id: I9eb92583f2cfe1a0a6bee54e3e3f31528c3b6993 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit ab88fcd990523070f2c018f4599b9bfa023d3b95) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 47cf611d54938d0b7916aa72167b52f50b846723)
* Add unit test for QML_ELEMENT as Q_GADGET in a namespaceAndre Klitzing2024-03-301-0/+10
| | | | | | | | | | | | It was fixed by fa081b89f0bf8813e11d00436ab0dc9fb5efb378. Task-number: QTBUG-123592 Pick-to: 6.5 Change-Id: I6eb60f65efe608f99b92ccd595b19eac5b78d710 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a6e6cb7812b0a03cb0040093ea94c4d5f0f9200a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8b62cbc0fed70a340d607d549301f46745f9d728)
* Fix namespace in namespace detection of a foreign typeAndre Klitzing2024-03-302-2/+14
| | | | | | | | | | | | | Add full qualified name to QML_FOREIGN, otherwise it won't detect a namespace in a namespace. Task-number: QTBUG-123535 Pick-to: 6.5 Change-Id: I679edc2566739ee52bf531ecec64789350fcdd11 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit fa081b89f0bf8813e11d00436ab0dc9fb5efb378) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 80fa9f25b3321ac2e8ae2c181505f4b1acee75d8)
* Fix wrong generation of Q_NAMESPACESAndre Klitzing2024-03-304-3/+50
| | | | | | | | | | | | | Generate Q_NAMESPACE if foreign type is a namespace. Add compilation test for this only. Fixes: QTBUG-123535 Pick-to: 6.5 Change-Id: Iacce6681a3fba468c1a9646630c871e2553d56bd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit f080d0309d4c1d0d8a96dabe832162c5f41b881f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4b1704b8e050755de7b86ab0f1b0dd262ca98982)
* Basic.impl: Add dependency entry for QtQuickFabian Kosmale2024-03-271-0/+2
| | | | | | | | | | | | | | | | Types of the module derive from QQuickItem, so it should make the dependency explicit. This will help the QDS code model to find the connection to the correct types. Pick-to: 6.5 Change-Id: I59137d2d8d5b87f549a7d8dfc74283d21e38c93f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 9dc056c5171a2ddae963cf45fa4fb5bd3978e674) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d47d4b3fc5c88008df30067e2a43c674a9155d94)
* Materials.impl: Mark dependency on Controls.implFabian Kosmale2024-03-271-0/+1
| | | | | | | | | | | | | | | | QQuickMaterialPlaceholderText derives from QQuickPlaceholderText, so there is a dependency to Controls.impl on the C++ level. Make that one explicit, so that QDS can resolve the type in its code model. Fixes: QTBUG-123594 Pick-to: 6.5 Change-Id: I890f683af65daf501f93b4224897568ef269837d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> (cherry picked from commit b4962fd0ba705d0c5b5e185298bd6f663d6664dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 47dfab5803c0884e2bd68613f82ff522bc12e27a)
* Warn about missing default rolesSami Varanka2024-03-275-2/+73
| | | | | | | | | | | | | | | When a user implements their own model and view depends on some default role, warn the user about. This warning gives a hint on how to fix that error. It is the user's responsibility to implement model correctly. Fixes: QTBUG-119765 Pick-to: 6.5 Change-Id: I96a3b653275f37ab24c450c18ec91430a6aad379 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit e0cd9c6fc207249236950715a16ec94752df1b2b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 35ef5d10e91e8add56b6e5d8f4700cda563b92c9) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* quicktestutils: document isDelegateVisibleMitch Curtis2024-03-261-0/+6
| | | | | | | | | Pick-to: 6.5 Change-Id: I63c5d453a52df49ef0ce4a4d49c23ad5fe682824 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 4566f5186196bcd04d4e468fe990b206dec350ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cac8461c9418ece2fec93a58aee2ebc1bf010ce7)
* quicktestutils: rename delegateVisible to isDelegateVisibleMitch Curtis2024-03-264-128/+128
| | | | | | | | | | | Because it's the convention. Pick-to: 6.5 Change-Id: I1d3d53f5c051ede0b011c1daa9d1019cad8875f8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 617476d45bab183741ee0a1579d1b2b6f58658ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c4aea235df08b92f7ba2405ad148b89c8bb86b96)
* Document Rectangle's border.pixelAligned propertyEirik Aavitsland2024-03-261-0/+5
| | | | | | | | | | | | | For unknown reasons this property has been undocumented. Task-number: QTBUG-123210 Task-number: QTBUG-108831 Pick-to: 6.5 Change-Id: I1eba7385ee13943f9c1c3435583b570a18dff71e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3b6c8d305a91609713278c694a5d2297a880956e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d8d6153ebea853bd021388757333bf112c3e7bd6)
* QmlCompiler: Do not use QQmlEngine from current QML contextUlf Hermann2024-03-263-38/+48
| | | | | | | | | | | | | | | | | | | | We cannot be sure the current context is still alive when a function is called. We may be left with a skeleton context that doesn't have an engine anymore. However, we can always query the QJSEngine given in the AOT context. That one cannot disappear and is generally the right one for capturing properties. Pick-to: 6.5 6.2 Fixes: QTBUG-123395 Change-Id: I2a6c38baa159fa790f3ba2aba225fdc9cc37001e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit eb79815fbfad7d4e7fb4be856dc0dd43be76fdb9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8228f07a216dc6996be6584108d262829d68016b)
* Modify tst_FlickableInterop::touchDragSliderAndFlickable to passShawn Rutledge2024-03-242-3/+4
| | | | | | | | | | | | | | | | | We have a behavior change since Qt 5: if one finger drags a DragHandler in a child of a Flickable, a "stray" finger that touches the Flickable does not flick it. Time will tell whether this is a good change or not. But it's been that way in Qt 6 so far; and in the meantime it's best not to keep this test blacklisted because of one line. Pick-to: 6.5 Fixes: QTBUG-123490 Task-number: QTBUG-86729 Change-Id: Iad22211b4fe102c2c1d4d7f4c7485decc0aa17a8 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit d98f22995d9f6a401fbf77ef3c33a3fa9c316a61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6381928c2db5938264b2f166886bb87d5553d4e5)
* QQuickTableView: remove syncView from destructorRichard Moe Gustavsen2024-03-211-0/+8
| | | | | | | | | | | | | | | If a TableView has a syncView, we need to ensure that it detaches itself from the syncView when it's destroyed. Otherwise the syncView will have a dangling pointer to the deleted TableView afterwards, which can cause a crash. Fixes: QTBUG-120760 Pick-to: 6.5 Change-Id: I4c6acfaa0c623ea43ba8b938585fcd9c9247f66c Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit e5c031c1ac542be0d2ac7457e145da011fce0013) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d594c023b1589fbb692a13facecb4860ff9c1a1c)
* Adjust locale correctly in tst_spinboxMatthias Rauter2024-03-211-38/+70
| | | | | | | | | | | | | | | | | | | The test for displayTextChangedSpy.count is flaky and failed repeatedly in CI because the signal is emitted once more than expected. The reason was that setting locale changed the displayText depending on the native locale on the testing platform. Further down in the test, the validator failed because the locale was not set correctly on the validator. This patch sets locale in the correct place and also improves the testing. Fixes: QTBUG-114694 Change-Id: Ied4b41fbee5e25fabceabda6815272c44aa1f832 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit cf15ba9b085ac783fd3315f1b103c012947cb7db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 99248ad9ef5e15d70aa20647ab28cab95dae1f42)
* QmlCompiler: Correctly read various method attributes in qmltypesUlf Hermann2024-03-207-10/+58
| | | | | | | | | | | | | | The "isConstant" tells us that the return value is constant, and we should generally recognize "false" as well as "true". Pick-to: 6.5 Fixes: QTBUG-123413 Change-Id: Ibb5114f6e8c8cb3b45cc2296af6f18cdc5cb1ed1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit d75c816395e23ed0bb89e4e98ea3f809b5262527) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ea76ae03f12496259f2085e3f766f8aab9a412bf)
* Make the QSGTexture native accessor query work on macOS/iOSTor Arne Vestbø2024-03-204-10/+70
| | | | | | | | | | | | | Also add an autotest. Pick-to: 6.5 Fixes: QTBUG-108019 Change-Id: Ie809041019b0a1b842791994e42d9d75578eb350 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 18c2e2512b1256677ec09f8ac469f34ed30ce2f8) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 7a29fa8ba34926b2df8b6bab8d1555f0254fc0f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Dial: fix handle position in the Fusion styleMitch Curtis2024-03-201-1/+1
| | | | | | | | | | | | | The handle position has slightly changed, possibly as a result of the recent improvements in e.g. d93ca833f65893653071d7ba33fd129fe3db53dc. Account for that. Fixes: QTBUG-123394 Change-Id: I30155a9aac286e02b5f91e09f48392b3156c18dc Reviewed-by: Matthias Rauter <matthias.rauter@qt.io> (cherry picked from commit 1394ae663b6a4a6b07a5017393181c0fad236270) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 27dfeb3c988a016e1dda760e995271f41b5af1c4)
* QmlCompiler: Respect scoped enumsUlf Hermann2024-03-2018-37/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly propagate the isClass and RegisterEnumClassesUnscoped information from metatypes to qmltypes, then read it correctly, and don't try to resolve unscoped values of scoped enums when resolving types. Neither try to resolve the names of unscoped enums. For historical reasons, enums are unscoped by default, even if they are declared as "enum class". Furthermore, QML enums can be accessed in both scoped and unscoped way. Scoped C++ enums can only be accessed by explicitly stating the scope, and unscoped C++ enums can only be accessed without scope. Since qmllint now correctly analyzes this, we need to adapt the tests accordingly. Finally, also fix the logic around populating the error message for qmllint. We want to warn about the enum itself, not one of its values. And we always want to setError() if something is wrong so that the compilers don't try to continue from there. Pick-to: 6.5 6.2 Fixes: QTBUG-107143 Change-Id: If1ee9a10479cffb46067ccb5e683906905c24160 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7da544e862a92cc0a9d97cbed68a35c532699116) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 806af3541056a580d0c2c6c5d7a518efbc473b68)
* tst_TapHandler: unblackist OpenSuSEAxel Spoerl2024-03-201-8/+0
| | | | | | | | | | | | | The test is no longer flaky on OpenSuSE. This patch unblacklists it. Fixes: QTBUG-95939 Pick-to: 6.5 Change-Id: Ief388369f6ada575474f47b768eb6fb6ac209a27 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit b9691bf52ed1c1e90ab6c4b48dda10b202235e2a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 85e60ed249d6d2997e2a92224488d9263ff3155c)
* Prevent infinite loop when setting activeFocusItem of the scene's rootDoris Verria2024-03-193-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we forceActiveFocus on a QQuickItem we set focus to all ancestor focus scopes, in their parent scope. That involves setting 'item' as the subFocusItem of its immediate focus ancestor. In Qt Quick 3D, where we have different subscenes, we follow the same approach as mentioned above, but at the same time, we would set the item that is getting focus as the activeFocusItem of the scene’s root item and by so doing, we would set the subFocusItem of all focus ancestors of that item to 'item'. This is not entirely correct since each focus ancestor's subFocusItem must be its nearest descendant with focus. But we would then proceed to go up the focus hierarchy of the item and this time try to set its ancestor as the activeFocusItem of the scene’s root, "undoing" what we had done in the previous step. This would cause a lot of unnecessary clearing and setting of the subFocusItem as well as focusIn/out events, and sometimes even infinite loops like in the case of compound controls, like the spinbox, which gives active focus to its textField content once it gains focus. To fix, don't change the subFocusItem of the scene's root item unless we have traversed up all the focus hierarchy. Fixes: QTBUG-120542 Pick-to: 6.5 Change-Id: Icf08edd2ff8b64662011f66c7137b44750cda9f2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 1863c068191601beba0bcdc970185703c8296e3d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2f9ef932b4ddcaa32c51a60ce33dd4b6f27724c6) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Handle more potential underlying typesFabian Kosmale2024-03-185-0/+107
| | | | | | | | | | | | | | | | | | Since f3bcbfd6a50fb7e74f4ff6714d3b3066fa74e253, we use the underlying type of an enum when the binding is detected as a resolved enum and the property is of enum type. When using an enums underlying type, we can receive types that were formerly not possible, because we would normalize them to plain int. Fix this by teaching the object creator to handle assignments of signed and unsigned integer types. Fixes: QTBUG-123428 Change-Id: I3635b7de048e0c6ddf79381679aafee89a5b3def Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 186405955f1057111379369fc43951513c461aa9) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Fix PointHandler rejecting click events near window edge with HiDPIFushan Wen2024-03-161-3/+3
| | | | | | | | | | | | | | | | When using HiDPI and a click happens near the window edge, the global position might have fractional parts, but after the global position is converted to QPoint, the position can be rounded so it happens to stay at the window edge, so the window geometry will not contain the rounded position. Related bugreport: https://bugs.kde.org/show_bug.cgi?id=482580 Change-Id: I51a26f955fd58f2a135c64ceb32ee881a03fcaf8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 9089292c495970b00728398f49e8f66bab1f4f32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2c3d7bfb74f951ca6ce017248c1c71de5e6f0595)
* Use QPlatformTheme::themeHint not QPlatformIntegration::styleHintShawn Rutledge2024-03-162-6/+6
| | | | | | | | | | | | | | | | | | | Default values for such things as Flickable.flickDeceleration and maximumFlickVelocity, and the internal use of FlickStartDistance, are meant to be customizable in a QPlatformTheme subclass, for example KdePlatformTheme. QPlatformIntegration::styleHint() calls defaultThemeHint(), not the virtual themeHint(). Tellingly, there are no other calls to QPlatformIntegration::styleHint() in qtdeclarative. Amends 84d69e4695c179e595d24928a6480852d7f5186f Task-number: QTBUG-35608 Task-number: QTBUG-35609 Fixes: QTBUG-121500 Change-Id: Idc17ee424755db1c7ba431f06fa5ef6515516c88 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 691248f9172fde05110eb015e92823a525af754d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit de2e3b7682be8719b307b166037f93fd9f4bdf78)
* Fix deadlock in long-running particle systemEskil Abrahamsen Blomfeldt2024-03-152-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. Pick-to: 6.5 6.2 5.15 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)
* Make loadFromModule compatible with QQmlParserStatusFabian Kosmale2024-03-144-1/+69
| | | | | | | | | | | | | | | ...as well as the private finalizer hook. Given that QQmlComponent::loadFromModule creates the object through the QML engine, we should support the lifecycle methods, even if we sidestep the usual creation process through the QQmlObjectCreator. Pick-to: 6.5 Fixes: QTBUG-122076 Change-Id: I2dfe5dd607414df123519d9fccd4178cc5e4cde7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8896d380ae253a259192ef4e9225c6dfe7c271c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 40cde2552cb4dcb7998d1e3c64433a7fe1c91131)
* Mention d3d12 in qml tool help textLaszlo Agocs2024-03-141-1/+1
| | | | | | | | | | | | | | It works since 6.6 regardless, but the help text had no mentioning of it at all. Also use the nicer "opengl" instead of "gl" (both are accepted by QSG_RHI_BACKEND anyway) Change-Id: Ibf6de9411d8641d244b8750fd7a015781a9297b1 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit d4d18dbeaae231a098cbfb71495b2acc18e77902) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3259314792feb652b7655d494735d1323fd43788)
* MessageDialog: emit accepted, for buttons with roles Yes and AcceptOliver Eftevaag2024-03-143-0/+54
| | | | | | | | | | | | | | | | | After b00798df9d842570524550b6780a1debc4fe5387, the MessageDialog would immediately close, when handling a click on a button inside of it, and it would always emit rejected, since that was the default result. The issue was later fixed in 8dd68783642e6ea42e9a7b32e1671424d1d0eeed, which was unfortunately not backported to 6.6 and 6.5. This patch should serve as a very simple solution to fix the issue for those that are using 6.6 and 6.5. Fixes: QTBUG-122770 Pick-to: 6.5 Change-Id: Ia1f6a3fb0fd735188e74ad3e820fc3407f35c5cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SwipeDelegate: forward 'move' events to the child itemsRichard Moe Gustavsen2024-03-132-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | SwipeDelegate will currently forward both press and release events to the child item under the mouse (swipe.left or swipe.right), but not move events. If e.g swipe.left is a Button, the result is that you can 'click' it, even if you release the mouse outside it's bounds. The reason is that the button still thinks the mouse is on top of it, because of the missing move events. This patch will do the same as we do for both press and release (in handleMousePressEvent() and handleMouseReleaseEvent()), and forward the mouse events to the item under the mouse. This will make sure that a Button (or MouseArea) will detect when it's no longer hovered, which (in addition to updating e.g MouseArea.hovered correctly), also ensure that we don't emit clicked when we shouldn't. Pick-to: 6.5 Task-number: QTBUG-110475 Change-Id: I6d89e86e76c09168bebc12285c13c8bb68502bb9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 25355faf6167e237e954061b3e915d66dd35d6cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 20b6f6d9d1fd1042d642b90f992ca99681c63246)
* fix crash in qquickspinbox.cppTim Jenssen2024-03-132-1/+7
| | | | | | | | | | | | | | With a custom style, the validator might not be set initially or at all. Task-number: QTBUG-123160 Pick-to: 6.6.3 Change-Id: Idd4b801e75737fa2cfac112d06f9f7ad04278c26 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> (cherry picked from commit 6e853af5b97d71d0cffa978a2bf502083c222348) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e68b9dc5882382169225f6f409e510a4f52dd6d7)
* ApplicationWindow: explicitly set background size if not explicitly setMitch Curtis2024-03-134-20/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 41eb033fa2585b3644a545b75a414d4d3efa8b2c addressed QTBUG-118779 by documenting that certain items like Image would need to have their size explicitly set to the size of the window. This isn't in line with the background-resizing behavior of Control, which explicitly sets the size of the background if it hasn't been set (see 7e3c882d9a5cd6a25f547091a4ece786f516f2a4). This patch partially reverts 41eb033fa2585b3644a545b75a414d4d3efa8b2c by removing the change to the documentation. The relevant code in the wearable example has since been changed, so there's nothing to revert there. [ChangeLog][Controls][Important Behavior Changes] ApplicationWindow now explicitly sets the width and height of its background if no size was explicitly set by the user. This matches the behavior of Control, and ensures that if e.g. an Image is used as a window's background, any changes in its implicit size (e.g. after a source change) won't affect its actual size. Fixes: QTBUG-121466 Pick-to: 6.5 Change-Id: I0fbe029626d736b4b96acce1a2ca450660a47271 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 4a2466ea075676e8953ac7e9729492a0ace02c32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1b5b3e4b36c6da8883e763646ffaacf2c993c286)
* Fix duplicate HighScore when replaying SameGame ExampleWladimir Leuschner2024-03-131-4/+7
| | | | | | | | | | | | | | | | | | | The onClosed slot invokes SameGame.saveHighscore function in samegame.js. Also the startNewGame function in samegame.js is triggering the SameGame.saveHighscore function by calling Dialog.hide, which in turn calls the onClosed slot. This leads to duplicate highscore entries. Moving the closing of the dialog after the clearing of the board/score and additionally adding a condition that if the score is 0, no highscores are saved, the duplication is avoided. Fixes: QTBUG-119812 Change-Id: I6aa433789f197a0d1e70abc82baf893934e53be5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit fddba23321bd90b39ab1028fbd7d1b52066bc1b6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fbf5ee52d00498b2b0e86fcb3544cf35d26f65b8)
* Update palette in quickwindow when binding palette changesSanthosh Kumar2024-03-124-0/+58
| | | | | | | | | | | | | | | | | | The palette in quickwindow doesn't update to the change in the binding palette (for instance, if any of the color roles changes in the binding palette, the changed color from the same color role has not been reflected in the window palette). This patch connects the changed signal from the binding palette to the window palette and whenever the changed() signal is triggered, the binding palette will be once again set to the window palette.  Fixes: QTBUG-121388 Pick-to: 6.5 Change-Id: I9b837fe6c1213798b0681e5f92c17172a6cde4b9 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 95637da9a7e74d0488ec7b2f52e35cfccd927dc8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b89b831248654a834bb80151344c8ef1f70ba60a)
* Fix ItemParticle constant CPU usageSadegh Taghavi2024-03-092-4/+63
| | | | | | | | | | | | | Takes particleSystem enabled and running states and particleItem enabled and its parent enabled into account with some connections Fixes: QTBUG-117923 Pick-to: 6.5 Change-Id: I3921759cf09a3aea2b8bfa51f847c5a909bb534b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c6fad0e79ec7768e1bbd852dd85a594e4318f8f7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3fbca326e5bd4c0fabec79bfc7ff7439b30fc2d0)
* Fail gracefully when binding an attached property where the object is nullVolker Hilsheimer2024-03-083-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overlay.overlay is an attached property that holds the window overlay item, our documentation promises that it can be attached to anything, but will be null if the thing is not in a window. When using QQuickView on a QML code that declares an item which tries to bind something to the Overlay.overlay property, then the overlay will be null, and creating it will fail because there is also no window yet. This crashes further down processing when trying to create the binding. While this cannot be made to work (modifying the window is not possible in QML that doesn't declare a Window and is instead loaded into a QQuickView), it should also not crash. Add a nullptr check where it did crash, add a test that reproduces the crash, and with the fix merely spits out a warning. Fixes: QTBUG-122894 Pick-to: 6.5 Change-Id: Ie4438657a6855b44409edb28431e04eb9875a392 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> (cherry picked from commit bad5a7ac1fe3ec39c6c9a0111f1514177a69315e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 56de91bec09bb0f14f13b2522efe547ffd86000e) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QQuickDeliveryAgentPrivate::deliverHoverEventRecursive - remove "return"Axel Spoerl2024-03-071-3/+0
| | | | | | | | | | | | | | | | The return statement at the end of the method is never reached, due to an earlier, unconditional return just above. Remove it. Task-number: QTBUG-115438 Pick-to: 6.5 Change-Id: I2750e01de6a34b6cedaf28ab01066e12eb0ac834 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a997b376c79fb955c4c2344eae7da5fec4853958) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 020ac3d97611c8975147d537db4c52a62fd362b6)
* Material: remove ComboBox's insetsMitch Curtis2024-03-071-3/+0
| | | | | | | | | | | | | | | | | These were probably necessary when it had drop shadows, but it no longer does. Doing this makes it the same height as TextField. [ChangeLog][Controls][Material] ComboBox's insets were removed. This may cause visual changes to UIs. Task-number: QTBUG-120067 Change-Id: Ia66f254eb5d556b7f629488a8f74e2417d7d7489 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 4c355bf34efab09010d0f1cba4f5c3b6f5ebf0a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bfe8bffbb954b91e97cf550c437af736f5ff6919)
* Material: animate RadioButton indicatorMitch Curtis2024-03-071-4/+27
| | | | | | | | | | | | | | This makes it match the specs: https://m3.material.io/components/radio-button/guidelines#eba97636-1dd9-4e81-a1a6-20b8123d1b83 Fixes: QTBUG-113532 Pick-to: 6.5 Change-Id: I266a8f8c6ace780650b26f72fa1bd7ea8c933507 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 8726722886454be0fd531ce7f28ad3bdec12cab1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fa184d03837affe8a19b779d3c6fff59a6f2cd89)
* Material: fix floating placeholder text x positionMitch Curtis2024-03-076-6/+105
| | | | | | | | | | | | | Don't set it to control.leftPadding, because we don't want it to change if the user changes leftPadding. Fixes: QTBUG-120149 Pick-to: 6.5 Change-Id: I67bbc22192fef386fe088398b67d3eb0a10421ba Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit cb7eb152204e206539f307a9556eea43c589f026) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b018532c570a2cb4ebaf70925d0e03324ec2bbc1)
* Fix build without features.validatorTasuku Suzuki2024-03-071-0/+2
| | | | | | | Change-Id: Iec6a103dac9b19ab04f155533fe14ab8d9800817 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 1437722391f9a0d5a1e6c31276a2f20948e561a2) Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
* doc: Remove statements that horizontal rules are not renderedShawn Rutledge2024-03-072-2/+0
| | | | | | | | | | | | They've been rendered since eca6bd485436f9ddf16036b98c993b7ffeb7e6c4 Pick-to: 6.5 Task-number: QTBUG-74342 Change-Id: Ifabe3d38ab7121145b76653faee324f4c656def1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 9b39b0301dcc922b9525bcfeaa98fbc51e1174f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6053360f374146ece029fc9e5af55afaaa2448dd)
* Baseline scenegraph test: avoid rendering blacklisted itemsEirik Aavitsland2024-03-071-0/+6
| | | | | | | | | | | | | Employ the new functionality in the baseline framework that facilitates skipping blacklisted items prior to rendering. Useful if rendering certain scenes cause crashes on some platforms. Pick-to: 6.5 6.2 Change-Id: I9f545751bff66eac548fdac8212f0ade4df7b6de Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 4ca19bab7eeaa3734a315db236d493e936002be5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 22936a7c0a1fdd5231408455e61941eb10e2148d)
* QQuickPopup: always run exit transition on hiding a popupVladimir Belyavsky2024-03-052-6/+38
| | | | | | | | | | | | | | | | Amends c16dc16cafa78ea2a3d1ef6e374f46d6632da779. Do actually what the comment said "Do not start EnterTransition for a popup in QQuickPopup::setVisible() when the popup is not yet associated with any window" but do _not_ touch original ExitTransition logic. Fixes: QTBUG-122915 Change-Id: I77db41254d1c1966f4b3b5285e26efd0487da51b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 30ae9e99e275d9c2288a14120b36f763a9d88c78) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 92446b9de8f66d5f730cdab1ec8907bda30b2c65)
* Fix crash when item is deleted in event handlerPaul Olav Tvete2024-03-052-1/+39
| | | | | | | | | | | | | | | QQuickDeliveryAgentPrivate::deliverPressOrReleaseEvent() creates a list of possible targets and iterates over it. This would cause a read of deleted memory if delivery to one target would cause another item in the list to be deleted. Fixes: QTBUG-91272 Pick-to: 6.5 Change-Id: I3f648e683d9b441ee0f14e4f721338ac59ace3cc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 10536ea75063210e78563e35e4ad3a755b172530) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9c9072e82fe531a0a5b70ac7b914e9e1099248d4)