aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* SpinBox: expose increase() and decrease() to QML6.11Liu Zheng17 hours5-2/+30
| | | | | | | | | | | | | | | | | | | | When QQuickAbstractSpinBox was extracted as a CRTP template base (680c871fbf3927f45fd3ad23e3ec3fa4d7e888ba), the increase() and decrease() methods lost their Q_SLOTS declaration. As a result, these methods are no longer registered in the meta-object system and cannot be called from QML. Re-declare increase() and decrease() with Q_SLOTS in both QQuickSpinBox and QQuickDoubleSpinBox so that the moc generates the necessary meta-method entries. It has to be done in those classes, since QQuickAbstractSpinBox isn't a Q_OBJECT or Q_GADGET. Fixes: QTBUG-146908 Change-Id: I032607a7dbe24114464cd5233851f6332bee801e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit bdba9f2707574a48c250c5e990860b444c901b1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cfc917802c7b95a3d9c6e17654956b532a6a2c4a)
* qv4codegen: Always check for errors after calling expression()Olivier De Cannière45 hours1-8/+31
| | | | | | | | | | | | | This makes the logic uniform throughout the whole file and prevents more potential crashes like the one found recently for coalesce expressions. Pick-to: 6.8 Change-Id: I36cb6c07b4a3665f87b30f287414e3abaa4023a4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit db3511435483ab45ec364808a366f91a368ea3ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aa7a32ef1cb1de848722f79df4da5cc0b10f7bd0)
* AbstractButton: fix clicked being emitted twice when disabling actionMitch Curtis2 days4-14/+32
| | | | | | | | | | | | | | | | | | | | If a button's click handler causes the action to be disabled, clicked would be emitted twice. Fix this by tracking whether the action was triggered before emitting clicked. tst_QQuickMenu::disableWhenTriggered was failing because it disables the action in response to its triggered signal, which meant that the effectiveEnabled check in QQuickAbstractButtonPrivate::click failed and clicked was never emitted. Fix that by tracking the enabled state in wasEnabledBeforeTrigger and allowing the emission if it's true. Fixes: QTBUG-147450 Change-Id: If61efb80ab525d09e55600858887d464d90f176f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 562f3adc6b8a19138434ac872e9257d9511a4ced) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a6ebbe829c044e4cac56ede6ac1d0981f82e5564)
* qqmltc: Better organize the lcQmltcCompiler logging categoryOlivier De Cannière4 days3-3/+3
| | | | | | | | | | | Its declaration and definition were in two separate cpp files. Move the declaration to a header file. Change-Id: I9d05ca0ceb48de1e6dc8a427f339bd59ab84e105 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 51c4d8bfc9e519aa4b09821c5986e23a6fbcce43) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 701b0b81538aed2a2833c2142e3c7d3d4f532421)
* qqmltc: Add security headersOlivier De Cannière4 days15-0/+15
| | | | | | | | | | | | Everything is significant by default except the codegen parts that are critical. Change-Id: I01c0cc48158a0daa6ac3aed9e953c0e79d223728 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 46f209d9f7decac757aacda66d290c748b06ed09) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f069f91bc9c21b67c53b8dbcd2429ed92eedbfe7)
* qmltc: Don't set all logging categories to ErrorOlivier De Cannière4 days2-0/+82
| | | | | | | | | | | | | | | | | | | | Many of them are not relevant to qmltc and shouldn't prevent compilation. Instead use a list of overrides to the default list of categories to specialize their behavior for qmltc. Make sure the list stays in sync with the builtins by comparing their sizes in a test. Fixes: QTBUG-147215 Change-Id: If467a0ef6aae3581642fa0cf5ad652e991f6fd87 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 39742e8930cfc24d19a10ce213ee647a1adb2117) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b8de4ef522df1bd40a98ed963bc33452e5465e78) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltc: Remove redundant Qmltc prefix for type namesOlivier De Cannière4 days13-433/+411
| | | | | | | | | | | | Everything has been moved in the QQmltc namespace anyways. Task-number: QTBUG-147215 Change-Id: I3ba50da2d8b4643a30b0bf017a8f939a8ce6e307 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 90aa5d935cf899968dbf24e9de3a7d3f7509d363) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e19a66d8bab4ae2a0b57d9e0aafa0be035a6a672) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltc: Move most of the logic to a new QmltcPrivate static libraryOlivier De Cannière4 days17-0/+5764
| | | | | | | | | | | | | | This will allow for logic to be exposed to tests. Replace a usage of std::not_fn with a lambda negating the result to avoid a supposed bug of VxWorks. Task-number: QTBUG-147215 Change-Id: If98f652d93a61657196ac14f50138946f253e2f7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 31e4e72752c38be85eb54f1afcf86f7186081507) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d5c858f03b691fe1eb601bd92618162947a3cee9)
* StyleKit: small string optimizationRichard Moe Gustavsen4 days1-2/+2
| | | | | | | | | | | Don't take a copy of the string literal at run-time. Create a string view at compile time instead. Change-Id: Id8c59fd41f37fcecf1f66598344ab7f62fdf9884 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit de111c3e014e5d6b4cf36b9729ac5502ec224e7e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 45e1e09cd7a16393db72eca089e85ee7e02d9328)
* Doc: Add missing l in \l commandOlivier De Cannière5 days1-1/+1
| | | | | | | | | | Amends c6876dc4b11cd5b53bab62fac91468dacdedf850 Change-Id: I09d8475f998db4aba3219fd53d4de3c77617b4ae Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a4897be9222ed6c9d6eb589139ea5672e29c164f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b615dfc93d87af8c5e6512c54464deaeda40b516)
* Particles: Allow elements to be re-configured at run timeUlf Hermann5 days7-20/+98
| | | | | | | | | | | | | | | | | | | | | | | So far you could not assign an Emitter, Painter, or Affector to a new ParticleSystem. Changing the value of the "system" property at run time would simply crash. Add the required "un-registering" functionality to make that possible. Also, don't handle the internal communication between the different elements via QML-public signals and slots. The user might interfer with those and then we don't know what signals to disconnect from what slots when re-configuring the elements. Instead, directly call the relevant methods. They all have pointers to each other after all. Since this fixes a potential crash triggered by QML-only code, it needs to be picked back all the way to 6.8. Pick-to: 6.8 Task-number: QTBUG-146122 Change-Id: I1317dd6dece06caf49c5241af3423eecf0ffa142 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 89de96a36dedbe3fa72b3fc73de773eef5583d7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4c332ed67f8576f7ec67189f3da528e8cbdadcfc)
* QQuickItemView: register Destroyed listener when storing an itemVolker Hilsheimer5 days1-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends fa8bfd6ed5ec4150cd2b05cd17b199097193fb1b, which added the registration logic to createItem with corresponding removal of destroyed items from the unrequestedItems hash. As we add items to that hash also in createdItem and releaseItem (for items that are scheduled for destruction via deleteLater), make sure we handle the Destroyed change for those as well, and don't remove ourselves as a listener prematurely. However, we need to also explicitly remove the item view as listener from all items when the view gets destroyed, and remove them from the unrequestedItems hash when the itemDestroyed handler gets called. As a drive by, turn the static const constant for change types into a compile time constant. Task-number: QTBUG-142738 Task-number: QTBUG-133256 Task-number: QTBUG-46798 Pick-to: 6.8 Change-Id: I216642dde549079d64917791bd7ba3dfe1d1e132 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit b0b1c1de68a1cc15f6304bb85d0c57a49499f866) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9c3d6b47d962fc58aa9e641dddea8a446eff2a98)
* qmllint: don't print out absolute pathsSami Shalayel7 days1-1/+1
| | | | | | | | | | Make the JSON output respect the absolute path option. Change-Id: Ia11a201723c5ec3558efaf6ed39ca7906cae6992 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 93af2b4b6f592d147b9b03a6a0aa86472cfda69d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6c97a788c38fb35cc034d1fca96d6d41350f5b00)
* QuadPath: fix error in contains() for horizontal tangentsEirik Aavitsland7 days1-2/+10
| | | | | | | | | | | | | | | | | | The contains() function counts crossings of a horizontal line with other path elements, increasing or decreasing the winding number depending on the path direction in the crossing point. However, if the tangent was horizontal at the crossing, the direction is ambigious, and the count would sometimes be wrong, leading to wrong function result, and so to wrong shape filling in curve renderer. Fix by checking the sign of the second derivative instead when the tangent (first derivative) is 0. Fixes: QTBUG-147396 Change-Id: I32a44d2ed8051c469d06eef1ee272ef5a8036be9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 2a1a5a6840b50687452e2087116245472c7422dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2ba53f1453c01888716234837468b9baba996094)
* StyleKit: hide hidden containersRichard Moe Gustavsen8 days3-0/+3
| | | | | | | | | | | | | | | | | | | All DelegateContainers that contain hidden delegates should themselves also be hidden. This is an optimization since the scene will then contain fewer items. Equally important, this also ensures that if an indicator is hidden, its foreground will be hidden as well. Previously, this was not the case: setting 'control.indicator.visible: false' would not hide control.indicator.foreground. This was a violation of how the visible property works for QQuickItems in QML, and StyleKit should work the same way. Change-Id: I359b2225a3f0e8155740c605c4897f5b75d8cbb2 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit db74b8b0f35df9e2c9675dc879d7bb7303dd3876) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ad8b3ee000b25404b1f7f5af999c6e68ebc5269e)
* StyleKit: ignore indicator layout alignment when fillWidth is trueRichard Moe Gustavsen8 days1-0/+6
| | | | | | | | | | | | | | | | | | If the alignment of an indicator was set to AlignCenter in combination with fillWidth, StyleKitLayout would try to center the item instead of letting it fill the available width inside the container. The result would be that the indicator was positioned too far to the right. This patch changes this so that we check fillWidth before alignment. If true, the item is added to the list of left-aligned items, which calculates the position correctly. Change-Id: I55aad0447920770951d6eab37233837ba2900dc0 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 99935a7df1e802bb404bbf425814946aa20bc022) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c6b5821a677a90aab82d828f65e691d0a3a5f9aa)
* StyleKit: hide gradient overlay when it's nullRichard Moe Gustavsen8 days1-0/+1
| | | | | | | | | | | | | | | | | | | If a delegate had a gradient, but it was set back to null (e.g after a style change), the delegate overlay continues to exists (which is deliberate, as we don't want to create and destroy items on for example state changes). But in that case, the item will turn solid white (even if its color is still 'transparent'). This might be a bug in QQuickRectangle as well (which needs separate investigation), but in any case, hide the gradient overlay when the gradient changes to null. Change-Id: Ib6d82fa3f168b010be67d6e9e44ce7417e6b68ed Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit a9e34fa6e838eff494c24790a6b4982319479efe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4bf6464c9d244c80a1f82309cdeb095684a4c289)
* QQmlComponent::loadFromModule: Set up ddata early enoughFabian Kosmale10 days1-16/+18
| | | | | | | | | | | | | | | | | | | Classes which implement classBegin might eexpect that qmlEngine and qmlContext already work at this point. This is for instance the case with Window. The two functions rely on a correctly set-up ddata, which QQmlComponent::loadFromModule only did after calling classBegin. Fix this by calling the ddata code earlier. Fixes: QTBUG-142578 Pick-to: 6.8 Change-Id: I4f5f85af8cd80c1749140ffabfdc78bed6c2f0ec Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 73bf3233f0d5766637122121c17b875e11f981c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 86f4f699960f439cb66b4b993b01e3892c0ad4ce)
* Doc: Tag QML overview topics with 'qmltopic' keywordTopi Reinio10 days46-0/+46
| | | | | | | | | | | | | | | | | | | This allows filtering for topics in the online documentation TOC-tree (sidebar) for QML-specific entries. QDoc does this automatically for QML API documentation (e.g. type reference pages), this commit adds the tags for overview pages. Tagged pages include content that have no significant amount of C++ concept documented, but may still link to such pages. Task-number: QTBUG-142011 Task-number: QTBUG-141035 Change-Id: I6b9f78f325c050744539729675a5a8d624b7ef77 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> (cherry picked from commit 325d7dd75550f9e38a8334156e096a015be8614a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ebbba3be70c6bbf3e6ef23b85d5c8792f60a90ab)
* QQuickText: fix StyledText paragraph direction detection with tagsVladimir Belyavsky11 days1-12/+8
| | | | | | | | | | | | | | | | | | | | | When textFormat is Text.StyledText, the paragraph direction was detected from the raw markup string via text.isRightToLeft(). HTML tags like <span> or <b> contain Latin characters that cause the detection to incorrectly classify RTL content as LTR. Fix by moving direction detection for non-rich text into updateLayout(), where the layout text is already available: either from QQuickStyledText::parse() (stripped of markup) or from the plain text path. This also avoids emitting effectiveHorizontalAlignmentChanged with a wrong intermediate value when styled RTL text replaces other RTL text. Fixes: QTBUG-147277 Change-Id: I0256c1759d242349bcf047b1b0b37e9da35c5fab Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit b66eb296c2fa10756084c7ca1ee593e298cc2945) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 693239a08f3bda3c58388d5c00f6edd413da1c70) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Promote new syntax for declaring signalsUlf Hermann12 days1-3/+9
| | | | | | | | | | | | | | You should use the type annotation syntax since that is in line with the syntax for declaring functions. Pick-to: 6.8 Change-Id: I2bdc27baa702b8f6474bcc9651a52667c8f88ec2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 7fd7f7cc3ce4806af77d03673222c951fb3ff388) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 70f4385f7477193686eb8eb2551cbc5fff81b5ab)
* Controls: Fix documentation for the spinboxesUlf Hermann13 days3-12/+12
| | | | | | | | | | | | | | Various types were wrong. The regular spinbox has ints and the double spinbox has doubles. Amends commit 680c871fbf3927f45fd3ad23e3ec3fa4d7e888ba. Change-Id: I70a5db1e88213549cf89ea85b10f5a46a27b854e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> (cherry picked from commit 628789167b597299a79ad678230f5d6cf1651438) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 72186f4a500f754a6856af826049a795cf02b685)
* StyleKit: document why using Qt.alpha is better than using 'transparent' in ↵Richard Moe Gustavsen13 days1-4/+5
| | | | | | | | | | | | | | | | | | a transition As documented in the patch, recommend using Qt.alpha over 'transparent' for color properties that participate in a transition. At the same time, remove the previous tip, which also has been suggested earlier. This will give room for this more important note. Change-Id: I72d22ae6aba405f512fdc8a99df6fa823b2b023a Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit bd11b4ed70c2ce01a99795a91ef622212379b4ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8925d31485ad8af25169a5ee1db51abd5eb3ca4e)
* StyleKit, ApplicationWindow: read SafeArea from correct itemRichard Moe Gustavsen13 days1-4/+8
| | | | | | | | | | | | | | | | | | | | | As it stood, SafeArea was read from the ApplicationWindow rather than from the item that actually takes the menu bar height into account (which is the parent of the contentItem, named "ApplicationWindowContentControl"). The SafeArea on the ApplicationWindow would always return 0 margins, and since we overrode the default topPadding with this value, the window contents would also end up underneath the menu bar. This patch will make sure that we read the safe area margins from the correct item. This will ensure that the content item is pushed below the menu bar as well. Change-Id: I3aa280807a5743b6e3de32d54fc87cc8e33436db Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit fbd6f3b62bcfb0e8acf323a8930b7728e1866850) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8f0832dc93f58c3865eb26db3330a4ce73c53548)
* StyleKit: hide indicator.foreground when it's configured to be hiddenRichard Moe Gustavsen13 days1-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | As it stood, the indicator.foreground container would always be visible, even if the item inside (StyledItem) was hidden. This caused the StyleKitLayout inside IndicatorDelegate to still take it into account. The result would be that its properties such as foreground.margins would still be included when calculating the implicit size of the indicator. A bug could be seen from this for the MenuSeparator. In that case the implicitHeight of the indicator was set to 1, and the foreground hidden. But since the foreground had margins, the height of the separator anyway ended up bigger. This patch will ensure that we don't include hidden items when calculating the implicit size of the indicator. Change-Id: I3a47a10c3ebb54d912df9933de0f982df3bacd37 Reviewed-by: Dilek Akcay <dilek.akcay@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit bca9076507d6a69f700369aa3782ee318aa98c94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ac486c2e23252072b4c56f8883306e5424d828b8)
* qv4codegen: Don't access local memory of returned stack framesOlivier De Cannière13 days3-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | ~Jump performs a check to ensure that it was indeed linked to a label. This check can cause issues in cases where the codegen is aborted due to an error. Because Jumps hold on to references to the bytecode generator and because they can outlive it due to how they are stored in m_optionalChainsStates, we attempt to access memory from a stack frame that has already returned. This triggers ASAN but could also cause actual memory errors at runtime. However, the logic is wrapped in a Q_ASSERT so it was at least never shipped. Fix this issue by following the existing pattern in defineFunction to fix lifetime issues and by adding a hasError field we can check to the generator. Found by libFuzzer and ASAN. Amends 86c48761dc7ba5bcac7dc6740e94efbfb8678403 Pick-to: 6.8 Change-Id: Ia3505b9066ba04a3d56850d7bdee39e1165fd891 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 20ce458324dccf44ab39965159c07494923fefb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3aad106ce10f3f889478ce995ce3b04586012928)
* shape: Default to uint32 indicesLaszlo Agocs14 days2-2/+2
| | | | | | | | | | | | Quick fix to avoid regression due to broken uint16 code path. Amends 02c4a0594ce0b2f953394eda11632bcddc366bcb Change-Id: Id24b98e28fec8cf61d15cf77890717a5095acf10 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit ab5c4e40f721329142d5c41265bc882096e403a9) Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit ef06785138d84d207e325618811020ac858d0203)
* QQuickShapeGenericRenderer: fix race accessing rhi backendPaul Lemire14 days2-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | The generic Shape renderer was reading the window RHI pointer from endSync on the main thread while the render thread could still be initializing it in ensureRhi, triggering a ThreadSanitizer data race on QQuickWindowPrivate::rhi. Fix this by removing the unsynchronized first-use query path and caching the backend capability: - cache rhi backend initialization state - cache ElementIndexUint support - initialize both in updateNode on the render thread while GUI/render are in a synchronized phase - make endSync use no uint index support until rhi backend can be queried Pick-to: 6.8 Task-number: QTBUG-147177 Change-Id: I39d128078b33b011c25bf0d0e431cf2d367c5a3e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 02c4a0594ce0b2f953394eda11632bcddc366bcb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 6c99e1cea5cf40daa94c890a1e3c1b933864510a)
* Doc: Overhaul the Qml Disk Cache article so it has a better structureAlexei Cazacov14 days1-84/+121
| | | | | | | | | Task-number: QTBUG-146857 Change-Id: I87b55889684e1bd8aff403c74a9af8269841a385 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 399c7b86e1aaa667085e1282c4529f2a1c1c3cb2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8070c1ba50ffc1473ee706dd45a72be06bbbf303)
* Parser: Check for errors after calling expression() in coalesce exprsOlivier De Cannière2026-06-101-0/+5
| | | | | | | | | | | | | | We were not checking for errors after evaluating the rhs of coalesce expressions leading to a crash. Crash found by libFuzzer. Pick-to: 6.8 Change-Id: I0203b3af50cbd854d5facf83088b5672e88b5964 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 203819a48758b6085479b04d68b062f8856031d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 737cdaa0a5e7db9e8ca04c86d8408acd47c6e5f8)
* qv4codegen: Make sure pre-{in|de}cremented variables are not lvaluesOlivier De Cannière2026-06-101-0/+3
| | | | | | | | | | | | | | | | Otherwise, we potentially don't reject invalid inputs and crash. References are considered lvalues if they are not in the accumulator and if they are not readonly. Crashes found by libFuzzer. Pick-to: 6.8 Change-Id: I9695250c5de8f21d56aee6931eda4d47f234fcc9 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 686930bbaa7c8ee7c7bb96ed7b6ae062dc7481e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3dab5afc572394b1ff76d530125b12c5dc5d7d9f)
* v4Codegen: Fix incorrect predecrement warningOlivier De Cannière2026-06-101-1/+1
| | | | | | | | | | | | | It reported ++ instead of --. Amends 0cb56e810c587de469ee483bfbaafb325c871930 Pick-to: 6.8 Change-Id: I927bd0fc308452b6970bbc6e462621553a4a9a7a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3fc81ee7a9c7b948bf95a3039471a14eea579d68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e454788147e6c2a3394a2b4b550f947279b0dfcc)
* qmlls: Declare supported sections in .qmllint.iniOlivier De Cannière2026-06-101-1/+1
| | | | | | | | | | This avoids warnings in the console output. Change-Id: I7b30b80a65ca1a0aafeaec9afc46285c68c98df6 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 28ade70859581df1da3804a18353e5d97bdc23ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 819c18b0d771d9f80b45599943aebb5847863811)
* Doc: Clarify how to build with QML debugging enabledUlf Hermann2026-06-103-16/+22
| | | | | | | | | | | | | | Give the concrete CMake option to be passed and centralize the documentation in one place. Pick-to: 6.8 Change-Id: If49779f68dcd3616698869db51ecaf320b97c9de Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 85cd7ff126817166e6e8af6a121f962661c81e4b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 343a70293369d5626b4b76c76f7bae8f87875bc4)
* QQmlJSImporter: restore visibility of file-selected-only typesFabian Kosmale2026-06-106-13/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 7097e296e34ebac35486b9bd8b867ebd0cd0f852 moved file-selected variants out of the main lookup, any type declared only via file-selected qmldir entries became invisible to its consumers, so qmllint started reporting spurious "not found" warnings on common project setups. When the first variant appears for a name, also store it in m_types, matching the previous behaviour. To avoid picking up types with a different selector, the type lookup is now selector-aware: the linted file's own selector is passed to ContextualTypes, and findType discards a hit whose selector does not match. Multiple simultaneously-active selectors are not modelled here. This is different from the runtime, but is hopefully rare in practice, at least in cases where here is no non-file-selected fallback. The compiler keeps TolerateFileSelectors off and continues to reject anything involving file selectors. The issue was analyzed with AI, and the tests were auto-generated by it. Fixes: QTBUG-146759 Change-Id: I78870d5b64b2c75bf31319d69973c1ce634d6c76 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 7654eb1f73634e4dbc628db4badc85be48543e1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1c38cee52bf9b3d4c3cb8b3c55290e8e6ff6d704)
* qmlformat: Preserve comments around spreads in callsOlivier De Cannière2026-06-106-9/+10
| | | | | | | | | Task-number: QTBUG-123386 Change-Id: Iec97696f514116e51d28fff719c42bd4f4ea779b Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> (cherry picked from commit d10a4ce5fa8a00b39a0dca83d32ce3cfba9ea1b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 932b0633316edd7209795bf6bb07716178a346a5)
* qmlformat: Preserve comments around function callsOlivier De Cannière2026-06-102-7/+22
| | | | | | | | | | | Fixes: QTBUG-133679 Task-number: QTBUG-123386 Change-Id: I71f2e24ed70dafbd6f35b90d72b51f309623e688 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ae6dfc63668556e89057edb1b83de28d7554c5ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d9924b2e7622aa22601ed5374001ad57ff11215d)
* QtQml: Honor "prefer" redirect for qualified script importsJoerg Bornemann2026-06-102-5/+16
| | | | | | | | | | | | | | | | | | | | | | When a module is imported with a namespace, its qmldir scripts are imported eagerly in importQmldirScripts(). Unlike components and unqualified script imports, this path resolved the script file URLs against the on-disk qmldir location and ignored a "prefer" directive. For a deployed module whose QML/JS files are compiled into resources, the qualified script could therefore not be found: the engine looked for the .js file next to the qmldir on disk, where it does not exist. Apply the "prefer" redirect for qualified scripts too, the same way addLibraryImport() does for components, so the script is loaded from the preferred (resource) location. Fixes: QTBUG-143877 Change-Id: Icb75a80b3ec3478ee46eb2b869a363f03123c7c7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 18998fa6eb9f3e624df2a3c6fe222b22ce3fc1b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9155a3b033d19106d4c5ad3b90ae68c3c09a7004)
* Doc: Add qmlls as alternative target for 'QML Language Server'Kai Köhne2026-06-101-0/+1
| | | | | | | | | Change-Id: Ic7244a5652547ae3bc58c1ec4600c949b7dec9c7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 83b907553fea3a718d3c741f7e6f3fd5160191a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5a1c077b7571cedc0a20e43844b846908854da43)
* qmllint: fix bogus singleton warningSami Shalayel2026-06-091-2/+2
| | | | | | | | | | | | | | | | | | | Support empty resource prefixes in QQmlJSUtils::qmlSourcePathFromBuildPath() so that we can map build paths to source paths even when using `/` instead of the default `/qt/qml/` prefix. This avoids a mismatch where two qqmljsscopes are created for the source and build folder version of a singleton (one being blessed by build folder qmldir while the other isn't), which lead to the bogus singleton bugs in QTBUG-146688. Amends a37e4270a5e66507aeda483ec4d32262096b44cc. Task-number: QTBUG-146688 Change-Id: Iec9c17276f2aadfd9ce6b2a84f23c2ee4d5483f0 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 616a71bbf474608c35e38dcda9e044fa22d3ebc3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7a8e3711ca3c13bb6c8b7ea44dc6c81cae644ec7)
* Fix typo in Date's ParseString()'s comment - mention hourEdward Welbourne2026-06-081-2/+2
| | | | | | | | | Pick-to: 6.8 Change-Id: I6b86c802719ee2713a0e95125e87e07155401e3e Reviewed-by: Mate Barany <mate.barany@qt.io> (cherry picked from commit 617976a955903392b40bf9ee54ebe1118516b482) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4e9456395e61527a1b3edeeb0f93a2bde0462864)
* controlstestutils_p.h: add missing QTest includeMitch Curtis2026-06-081-0/+1
| | | | | | | | | | | | | | | | | | I couldn't reproduce it locally, but the error on CI was: [...]/qtesthelpers_p.h(110): error C2653: 'QTest': is not a class or namespace name [...]/qtesthelpers_p.h(110): error C3861: 'qWaitFor': identifier not found https://codereview.qt-project.org/c/qt/qtdeclarative/+/716225/8#message-7534c492b7381bcd70a60739d59a033e4c91d1cb This is necessary for the follow-up patch that uses ensurePositionTopLeft in TRY_VERIFY_POPUP_OPENED. Change-Id: Ifc613ad58ee32e9b7d21cdc19885ce912c8d78f5 Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 744f52256688ab1a4126bcc6c1d84288e3590146) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b918e69ddeda61a35f8f6ff6424b19bcdc18eff0)
* qmlformat: force is not an option anymoreSami Shalayel2026-06-083-18/+8
| | | | | | | | | | | We removed the last usage of the force option in 89212b6ae4d61d288df6611b88dfabf5abb09a58. Remove the option altogether. Change-Id: I88703a6cbb97981cd7ea2eeaea79bba13acbdeca Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit ed438006fd267143917bf3f1a831686454cd16fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6ed313eb5c2e56b8d714b304abc79f3107348031)
* Doc: Move the svgtoqml tool docs to the Qt Quick documentationAlexei Cazacov2026-06-083-1/+1
| | | | | | | | | | | | | | The svgtoqml tool is semantically closer to Qt Quick rather than QML, so the docs are moved to the Qt Quick section. The tool code is still available in the same location in the source tree, so no code changes are needed. Task-number: QTBUG-146857 Change-Id: I406f28c87bf2d3b31b3d469d3d4be7e35dfc1ea7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 3b852d32ef4571678eca211409e63a4ae0da822b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5b9ebff63c4ae038fe7900a932eec17c4f746e09)
* QtQml: Allow internal types in nested directories of QML modulesUlf Hermann2026-06-081-2/+13
| | | | | | | | | | | | | | Previously we'd allow access to internal types only based on URL. This doesn't work if the type is in a subdirectory. There we actually need to figure out if the type accessing the internal one is part of the same module. It might not be in the same directory after all. Fixes: QTBUG-139770 Change-Id: Ic80a4db5663597a2be3e768ab1f4b488a397d50d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 1d3a70d0330d968e605560147e11c1842d27a8ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ba67514d681a4e987d4f3d0c00ee3eda92952e6c)
* CMake: Sanitize paths for generated qmlcachegen filesAlexandru Croitor2026-06-051-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | A qml module's qml file could be located outside of the CMAKE_CURRENT_SOURCE_DIR. In that case the file(RELATIVE_PATH) operation inside qt6_target_qml_sources could result in a path with a lot of ".."s. This path is then used almost as-is for the qmlcachegen output file. The computed file name can be too long or can contain invalid path characters, which is problematic on Windows. Make sure to sanitize the path by doing the following: - Replace ".."s with underscores - Replace various other characters with underscores (slashes, spaces, dollars, hashes, question marks) - Use either the source dir or binary dir for the relative base, depending on which relative path is shorter Pick-to: 6.8 Fixes: QTBUG-146823 Change-Id: I58ca387a07f35cbdee8c514c3e20e4f791859e0e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit b40533e6acf244ac64f235ab70be561bc2a2e0ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b9c03cf64a9fde0ea730b0ad26ed7c4452f23e41)
* Doc: Move the caching info from "Qml Deployment" to "Qml Disk Cache"Alexei Cazacov2026-06-052-51/+50
| | | | | | | | | | Task-number: QTBUG-146857 Change-Id: I49b92cfd5d62cba146baf444a543592abf11dcc8 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 6f594c128537513ae1f3652b4a33cae036bc22b1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 23d7acd93734a097e5057e0fd732133391d741ec)
* Doc: Remove the Prototyping section from the deployment documentationAlexei Cazacov2026-06-051-8/+0
| | | | | | | | | | | | This commit removes this section because it does not belong here. Task-number: QTBUG-146857 Change-Id: Ibe38df07105d46cb8b22ea7414c4de3d14f94709 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 878687cf2c5d637361fffad4e205d0139a16a622) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c3b42a6139f94130fb3847cd7f7bb2b88a65414f)
* Doc: Update the Qml Deployment article introductionAlexei Cazacov2026-06-051-9/+3
| | | | | | | | | | | | | | This commit changes the introduction of the Qml Deployment article so is does not mention initializing the Qml runtime, because this info was moved to a separate article. Task-number: QTBUG-146857 Change-Id: I18982724a0c8f1e433804cdf076a01187b7b1c4b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> (cherry picked from commit e4f6c5e6259f351d4ac381fb6ca889cfc4664c0f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 67569b7b07e1341e43d751439f46c3e4febcfb9f)
* Doc: Move the info on initializing Qml runtime out from Qml DeploymentAlexei Cazacov2026-06-054-99/+142
| | | | | | | | | | | | | This commit creates a new Initializing the QML Runtime article. The article content is taken from the Qml Deployment topic, which is not a proper place for such information. Task-number: QTBUG-146857 Change-Id: I330ec3b6bc962715896d9adf69b1f0819174e390 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 15b26b7e0a454cb1391790e9e6a9ba2524ebf9b5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b180c7f66d226e7082ab4cc5c6cd78996e5c625f)