aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QQmlComponent::loadFromModule: Fix crash with dynamic metaobjectsHEADdevFabian Kosmale7 hours1-0/+49
| | | | | | | | | | | | | | | If an object has a dynamic meta-object (e.g. because it has been extended with additional enums), we can no longer create a property cache. This could have caused a null-poninter dereference; avoid this by checking for nullptr. We currently don't do any checks at all in that case; finding a better solution is tracked in QTBUG-136560. Pick-to: 6.9 6.8 Change-Id: I678cf9908d5bbec50e133a462f7f4c813dca44dd Reviewed-by: Ulf Hermann <[email protected]>
* CMake: Don't enable ASM languageJoerg Bornemann7 hours88-88/+88
| | | | | | | | Remove the ASM language where no assembler files are used. Pick-to: 6.5 6.8 6.9 Change-Id: I3c94f798803b054a432fc2c8d6d65c665572a202 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Fix qt6_target_qml_sources without QML_FILES argumentJoerg Bornemann7 hours5-0/+40
| | | | | | | | | | | | | | | | | Commit 137cdc364dd5d569c613b83246a26e3803d7556d broke qt6_target_qml_sources with no QML_FILES argument, because it called qt6_add_resources without FILES (for the QML files), which causes a linker error. Check whether we have QML files and only then create the QML-specific resource. Add an autotest that calls qt6_target_qml_sources separately for QML and resource files. Fixes: QTBUG-136491 Change-Id: I5e8173652887f257fd6d8e6c8d18bcc0e295b714 Reviewed-by: Alexey Edelev <[email protected]>
* TextEdit and TextInput: map QContextMenuEvent to text cursor posShawn Rutledge16 hours2-0/+86
| | | | | | | | | | | | | | | ...if the position is not already set. Events that come from a keyboard menu key or shortcut often have pos() == {0, 0}, but we want the context menu to be in the context of what the user is editing. First though, we need QQuickDeliveryAgentPrivate::contextMenuTargets() to search for items at the correct position. We don't override delivery order, but activeFocusItem should be in the list that is returned. Pick-to: 6.9 6.8 Fixes: QTBUG-136253 Change-Id: I7eea03e118a95a1a267f02bd3385cc1ae4cbb0a0 Reviewed-by: Mitch Curtis <[email protected]>
* Fix QmltcTests compilation when tableview or gridview is disabledJuha Vuolle16 hours3-2/+22
| | | | | | | | | | | | | | Put two of the QML files behind appropriate feature flags (they use TableView and GridView). Similarly guard the cpp side includes and access to the genrated QML type. As a drive-by add include guard when qml-table-model is disabled. Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: Ic643ccb3f8346fc650afe5d863b575e8cec2f57a Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Oliver Eftevaag <[email protected]>
* Compiler: Deduplicate conversion origins based on register's contentOlivier De Cannière28 hours3-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the type propagator, when encountering back jumps, we need to run the pass again in order to ensure that the state of the registers at the target of the jump is fully known. For this, we need to compare the latest state in the current pass with states we have encountered earlier. If a match is found, no more passes are needed. The propagation is run multiple times and state is accumulated between passes. For certain conversions, this will try to append types as origins again every iteration. These would previously have been deduplicated by QQmlJSTypeResolver::merge but, since the change at 1e095058e165b1c2f244799ca1928ae4cc046a2c, we consider 2 registers to be equal only if their d pointers are equal. And since instructions such as MoveRegexp create a new register for the literal type RegExpr every time, the pointer doesn't match with the one from the register created by the instruction during the ealier pass. This would lead to set of origin types growing forever and to the state never matching a previous one. This, in turn, caused an infinite loop because an additional pass was always deemed necessary. Therefore, restore the old logic that deduplicates based on contained type, variant, and (recursively) scope. Amends 1e095058e165b1c2f244799ca1928ae4cc046a2c Fixes: QTBUG-135457 Pick-to: 6.9 Change-Id: I23167e95b958304698d12537598c1d72b03a5364 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
* Remove TestUtils.js from qqmltablemodel testsMate Barany2 days2-22/+0
| | | | | | | | It seems to be unused. Pick-to: 6.9 6.8 6.5 Change-Id: I5c6849b01b407e9c8e569baa037c360dd1b88a63 Reviewed-by: Mitch Curtis <[email protected]>
* QtQml: Do not check revisions when resolving aliasesUlf Hermann2 days4-0/+55
| | | | | | | | | | | | | Revisions are for unqualified lookup. Aliases are always qualified. [ChangeLog][QtQml] You can now create aliases to revisioned properties that would be unavailable when accessed without qualification. Aliases are always qualified after all. Pick-to: 6.9 Task-number: QTBUG-136248 Change-Id: I2aae7bb104850def8f220bfab1a2fa056efe78e0 Reviewed-by: Fabian Kosmale <[email protected]>
* Support fill-opacity and stroke-opacity in VectorImageEskil Abrahamsen Blomfeldt2 days2-3/+23
| | | | | | | | | | | | | | | | | | | | The alpha value of the fill and stroke colors can be animated separately in SVG. In order to support this, we introduce a specialized ColorOpacityAnimation type in a Helpers library which only overwrites the alpha channel of the target property. This requires an extra hook in the animation frame work which allows us to get the current value of the property. It should have minimal impact on any existing code, but may have additional use cases later, when we implement support for additive color animations for instance. Since the interpolator API in QVariantAnimation is public API, we add a secondary, private API for this. If we see use for it in the future, this could mature to a public API as well. Fixes: QTBUG-135322 Change-Id: I803f4e64c41e9d6dc355f2468233661885aa7f15 Reviewed-by: Eirik Aavitsland <[email protected]>
* QtQml: Long live Qt.labs.synchronizer!Ulf Hermann2 days12-0/+630
| | | | | | | | | | | [ChangeLog][QtQml] The new Synchronizer element allows you to synchronize values between two or more properties without breaking their bindings. This is useful for connecting user-editable controls to backend values. Fixes: QTBUG-21558 Change-Id: I01c32d7a39f1efc89975d8494ad698444c803fd4 Reviewed-by: Fabian Kosmale <[email protected]>
* VxWorks: Reduce object creation count in newQObjectRaceJacek Poplawski3 days1-1/+1
| | | | | | | | | Following the approach taken on QNX This change prevents the newQObjectRace test from timing out due to excessive object creation. Task-number: QTBUG-133752 Change-Id: I7ba7c142425c90510923aeee98ad781c5a0ced83 Reviewed-by: Fabian Kosmale <[email protected]>
* QQmlListModel: Do not crash or leak when querying inner modelsUlf Hermann3 days2-0/+36
| | | | | | | | | | | The list models can be nested, and inner models don't necessarily have a layout. Also, we need to release any worker agents we reference. Pick-to: 6.9 6.8 6.5 5.15 Fixes: QTBUG-136127 Change-Id: Ibedefce2a1d6783169e754fbf083099d050dceb1 Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* tst_qmllint: Rename duplicate test tagOlivier De Cannière4 days1-1/+1
| | | | | Change-Id: I401c6b3aff6c2b9812883f9a3398e111a70191bb Reviewed-by: Sami Shalayel <[email protected]>
* qmllint: Warn about reads of non-constant and non-notifiable propertiesOlivier De Cannière4 days3-0/+45
| | | | | | | | The binding might not update if their value changes. Fixes: QTBUG-112508 Change-Id: I27801d662117a89c0fdddc2aaa2f1dde21b238df Reviewed-by: Sami Shalayel <[email protected]>
* Emit rowsChanged when the rows are changed in QQmlTableModelMate Barany4 days1-1/+89
| | | | | | | | | | | | Emit the rowsChanged signal when there is a change in the rows. Update the test cases accordingly. Fixes: QTBUG-136142 Pick-to: 6.9 Change-Id: I864a743f1a197c755daa014ce0dfcc71651ab8ca Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Matthias Rauter <[email protected]>
* qmllint: warn about duplicate property bindingsSami Shalayel4 days1-0/+46
| | | | | | | | | | Warn about duplicate property bindings for object and script bindings. Remove a TODO about doing this task that seemed to be at the wrong place. Fixes: QTBUG-118102 Change-Id: I46696b696f6c7e0c83e36077998d6118b14498ad Reviewed-by: Olivier De Cannière <[email protected]>
* Remove tst_qquickheaderview from compilation if tableview is disabledJuha Vuolle4 days1-1/+1
| | | | | | | | | | | The quickheaderview* files are part of build only when quick_tableview feature is enabled => put the testcase that relies on them behind the same feature flag. Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: I01597037edc7fc3f94f75bbf536778a3bdaef7c8 Reviewed-by: Oliver Eftevaag <[email protected]>
* Fix tst_qquickapplicationwindow compilation when hover is disabledJuha Vuolle4 days1-0/+4
| | | | | | | Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: I38ffaa60219cb4432ca7444d8b560a9daa22c935 Reviewed-by: Oliver Eftevaag <[email protected]>
* Fix tst_qmllint compilation if library support is disabledJuha Vuolle4 days1-2/+2
| | | | | | | | | | | The definitions of environment_data(), environment() and maxWarnings() were behind 'library' feature flag, but declarations weren't. Removed the definitions from behind the flags. Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: Ic1878d0482c311c444fa40903ae18b22c2f5d24d Reviewed-by: Oliver Eftevaag <[email protected]>
* Fix quickdialog test compilation if draganddrop or listview is disabledJuha Vuolle4 days1-3/+5
| | | | | | | | | | | Headers like qquickplatformfolderdialog_p.h aren't part of build if these features are disabled. Use same condition to enable the tests as the needed headers have. Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: I898ed607b4c6ac540fecacceaac1f630e64d3167 Reviewed-by: Oliver Eftevaag <[email protected]>
* Indent quickdialogs CMakeLists.txt properlyJuha Vuolle4 days1-4/+4
| | | | | | | | | A pre-move to ease the review of followup commit Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: I48ee8d07ced33d510193cda71c142742d3b69e6d Reviewed-by: Oliver Eftevaag <[email protected]>
* QQuickPathRectangle: Merge corner radius and bevel flags into a bitsetMagdalena Stojek7 days1-0/+66
| | | | | | | | | | | Replace separate storage for corner radius and bevel with a single 8-bit field cornerProperties. The first 4 bits track radius flags, and the next 4 track bevel flags. Fixes: QTBUG-134908 Change-Id: Ie2d706112965fc5dde07fa698e32e29695da219b Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Eirik Aavitsland <[email protected]>
* qmllint: Fix required property warning with owner mixupOlivier De Cannière7 days1-0/+8
| | | | | | | | | | | | | | | | Because we only search for the name of the property in the scopesToSearch and not which property that name actually references, we confuse a property of the same name in a neighboring scope for the actual required one. Include the property's owning scope when searching through the scopes. Amends daf57e29de918b7b4be7bb0d469db0c51d41bb07 Fixes: QTBUG-136058 Pick-to: 6.9 6.8 Change-Id: I998901fd0840270dd2048e7257d6eaca556b513d Reviewed-by: Sami Shalayel <[email protected]>
* qmllint: Fix name of inline component scopes for required propertiesOlivier De Cannière7 days2-3/+3
| | | | | | | | | Amends daf57e29de918b7b4be7bb0d469db0c51d41bb07 Task-number: QTBUG-136058 Pick-to: 6.9 6.8 Change-Id: Ibf412089427e4d9d5a568ee24c224b9fa41fd20a Reviewed-by: Sami Shalayel <[email protected]>
* qmllint: don't warn about required properties in inline componentsSami Shalayel7 days1-0/+9
| | | | | | | | | | | | Amends daf57e29de918b7b4be7bb0d469db0c51d41bb07 that recurses into inline components when checking for required properties that were not set. We should only check inline components that are base types of the scope, and ignore all inline components in children of the scope. Fixes: QTBUG-136008 Pick-to: 6.8 6.9 Change-Id: I8c687ce97b3f2eac699e2fd535193197b5239ada Reviewed-by: Olivier De Cannière <[email protected]>
* qmllint: warn about unreachable codeSami Shalayel7 days1-0/+39
| | | | | | | | | | | | | | | | | | | | The compiler is very polite and does not tell the user about its useless code. Codegen::statementList(StatementList *ast) silently discards unreachable statements during byte code generation. Warn the user that their code is unreachable. Don't warn about function definitions because these ones are "hoisted" up, which means that their definition is supposed to be pushed up, so that they can be used even if they are behind a "return" or "throw" statement. Don't use the qqmljsbasicblock analysis for that, it reports too many "false positives" where the compiler generates dead code that can't be fixed by the user. Task-number: QTBUG-129307 Change-Id: Ia26e8af1adf4e63b26dcaa7fb10be73b7eb084d7 Reviewed-by: Olivier De Cannière <[email protected]>
* Set the current directory earlier in tst_QQuickFileDialogImplFrédéric Lefebvre8 days1-4/+4
| | | | | | | | | | | | | | | | | | | The temporary directory is set as the current directory at the end of iniTestCase. iniTestCase() returns earlier if the temporary directory is not empty and this code is never reached. Set the current directory directory as the temporary directory earlier in tst_QQuickFileDialogImpl::initTestCase() to ensure that it is always set properly. Fix the failing test tst_QQuickFileDialogImpl::changeFolderViaDoubleClick() on Ubuntu 24 Pick-to: 6.9 6.8 6.5 Change-Id: I9e124280e69c67056e0cc9ce15a1a45b57221cb2 Reviewed-by: Axel Spoerl <[email protected]> Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Oliver Eftevaag <[email protected]>
* QQuickTest: add and use active focus macrosMitch Curtis8 days26-405/+523
| | | | | | | | | | | | | Also add support for popups (when controlstestutils_p.h is included). [ChangeLog][Qt Quick Test] Added QVERIFY_ACTIVE_FOCUS and QTRY_VERIFY_ACTIVE_FOCUS macros that can be used to get detailed failure messages for when QQuickItem::hasActiveFocus should be true but isn't. Task-number: QTBUG-133858 Change-Id: I30c67a84ccc16e3969bac5661648d0062bc3d62c Reviewed-by: Mitch Curtis <[email protected]>
* tst_qmlls_modules: encapsulate expected warningsSami Shalayel8 days2-14/+24
| | | | | | | | | | | Encapsulate the expected warnings into an own struct to prepare for the test of the context property feature, where warnings are emitted twice: once without required properties and once once the context properties were loaded. Task-number: QTBUG-128232 Change-Id: I0f2e8ac8e94913b0f4d1acba8c07201e7965f7da Reviewed-by: Olivier De Cannière <[email protected]>
* qmllint: Implement WarnFunctionUsedBeforeDeclarationSami Shalayel8 days1-0/+12
| | | | | | | | | | | | | | | | | | | | | Warn about functions used before their declaration. Its not technically an error like the "var used before declaration" because functions are "hoisted up" and therefore available even before their declaration, so create a new warning category for it instead of reusing the "var used before declaration" category. Disable the warning by default: Qt Creator used to have it as default, while other tools like eslint don't. For the same reason, don't warn about functions used before declaration during codegen, and add a method to warn about it in CodeGenWarningInterface. The code for "var used before declaration" can be reused by function declarations by adding a sourcelocation for function declarations in the "addLocalVar"-call, so make sure to differentiate between functions and vars by adding an extra member to Context::ResolvedName. Task-number: QTBUG-129307 Change-Id: I83a4f8cd00c120db23a0cec3365a00ed44de2836 Reviewed-by: Olivier De Cannière <[email protected]>
* Respect target DPR when drawing text objects in QQuickTextNodeEngineTor Arne Vestbø8 days4-0/+186
| | | | | | | | | | | | | | Instead of passing the DPR through as function arguments to each addFoo function we set the DPR on the QSGInternalTextNode and QQuickTextNodeEngine. We could have solved this by pulling the DPR from the QSGRootNode's renderer, but there might be more than one of them, and we're missing a setDevicePixelRatio in QSGAbstractRenderer (it's only exposed one level above, in QSGRenderer). Pick-to: 6.9 Fixes: QTBUG-127913 Change-Id: I48081d441259f0713cdc5f784eede6777b5fb601 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Doc: Version string '6.9.0' found in 6.10.0 sourcesInkamari Harjula9 days2-4/+4
| | | | | | | | | Version strings fixed in qtdeclarative. Task-number: QTBUG-135944 Change-Id: If829e0b430532c38300a461351e80e79665756e0 Reviewed-by: Johanna Äijälä <[email protected]> Reviewed-by: Topi Reiniö <[email protected]>
* qml-tool: Treat all arguments passed after "--" as positionalOlivier De Cannière9 days1-0/+35
| | | | | | | | | | | The argument "-a" passed after "--" was being interpreted as the -a option of the qml tool itself instead of being passed along to the qml program as a positional argument. Fixes: QTBUG-136120 Pick-to: 6.9 6.8 6.5 Change-Id: I602aea84e4766abeb47adce0f739f12315a70b24 Reviewed-by: Fabian Kosmale <[email protected]>
* Fix broken hover in ApplicationWindow's backgroundMitch Curtis10 days3-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8fb643f6d63813a5a8df5e829e4ddeb357e0348d fixed ComboBox not being hoverable by setting QQuickApplicationWindowPrivate::control's hoverEnabled property to true. By doing so, it ensured that only that control and its parent chain could get hover events, breaking hover for e.g. background. The correct fix is to adapt QQuickControlPrivate::calcHoverEnabled to skip the property("hoverEnabled") == true check for QQuickApplicationWindowPrivate::control, resulting in it falling back to the global checks. - Remove code added in 8fb643f6d63813a5a8df5e829e4ddeb357e0348d. - Move QQuickApplicationWindowPrivate declaration into its own header so that code outside the .cpp file (qquickcontrol.cpp, in this case) can use it. - Document behavior of hover flags in void QQuickItem::setAcceptHoverEvents. - Move the check done in tst_QQuickControl::hoverEnabledDefault() into the new tst_QQuickApplicationWindow::hoverInBackground() since they're closely related. - Add initial starting position argument to PointLerper's constructor since it wasn't previously possible to set it. - Remove unused headers in qquickapplicationwindow.cpp. Fixes: QTBUG-133886 Fixes: QTBUG-136031 Pick-to: 6.9 Change-Id: Ic32f902be6433c1c9dc9f4610c5715ce1537e605 Reviewed-by: Shawn Rutledge <[email protected]>
* qmlls: make QQmlJSImportVisitor process updates to filesSami Shalayel10 days3-0/+31
| | | | | | | | | | | | | | | | | | | Qmlls makes QQmlJSImportVisitor re-create a QQmlJSScope when a file gets updated. It turns out that QQmlJSImportVisitor only works correctly when used on an empty scopes, methods like rootScopeIsValid() don't work correctly if the scope is not empty. Therefore, reset the scopes before making QQmlJSImportVisitor run on them. Make sure that the internalName and the moduleName are still set. This fixes a bug where qmlls can't autocomplete an "in-memory" enum because the import visitor does not set the new enum values in the root element correctly on an non-empty scope. Pick-to: 6.8 6.9 Fixes: QTCREATORBUG-32634 Change-Id: If6d620f350215074f87b53bb153363f2dec06145 Reviewed-by: Fabian Kosmale <[email protected]>
* Add a test for degenerate arcsEskil Abrahamsen Blomfeldt10 days1-0/+113
| | | | | | | | | These should degenerate to straight line if any of the radii are zero. Task-number: QTBUG-135387 Change-Id: Ibd90c1bfe691b6bdeea968aaac1355bc5ea8de2b Reviewed-by: Eirik Aavitsland <[email protected]>
* Silence compiler warnings in tst_qmlls_modules.cppMate Barany12 days1-9/+15
| | | | | | | | | | MSVC is complaining about the following: conversion from 'size_t' to 'quint32', possible loss of data conversion from 'size_t' to 'int', possible loss of data Pick-to: 6.9 Change-Id: I6734fdb150a4221567d45dae20d5a25a2baab209 Reviewed-by: Sami Shalayel <[email protected]>
* Compiler: Skip bindings to properties of type QQmlScriptStringOlivier De Cannière2025-04-175-1/+53
| | | | | | | | | | | | | | There is nothing to do in the compiler. Setting the value of the property is already handled in by the object creator or the qobjectwrapper. Reading the value doesn't really makes sense and defeats its purpose . Fixes: QTBUG-134790 Pick-to: 6.9 6.8 Change-Id: I4576eb528e0dec273830b0244149a92ceb325bc9 Reviewed-by: Sami Shalayel <[email protected]>
* Compiler: Adapt AotStats to skipping functionsOlivier De Cannière2025-04-172-19/+72
| | | | | | | | | | | A revision was also added to the aotstats json format. Print a message asking the user to try again with a clean build if a missmatch in revision is found. Task-number: QTBUG-134790 Pick-to: 6.9 6.8 Change-Id: I0961bf841db17f280492ec787f404d9fe9b563f4 Reviewed-by: Ulf Hermann <[email protected]>
* tst_qmlcachegen: Rework aotstats_generation testOlivier De Cannière2025-04-176-35/+39
| | | | | | | | | | We don't have to call qmlcachegen manually and can simply rely on the build system to generate the required aotstats files for us. Task-number: QTBUG-134790 Pick-to: 6.9 6.8 Change-Id: I5a5d6189662b9eb1daeb7adb51e3dfc2c5a13b4e Reviewed-by: Sami Shalayel <[email protected]>
* tst_qmllint: use CallQmllintOptions in the snippet testsSami Shalayel2025-04-171-53/+88
| | | | | | | | Add a Column for CallQmllintOptions in the snippet tests, and use default options for all test rows there. Change-Id: If2fa91f6a19beca86afdbcda5c5ec9ea83ca4f03 Reviewed-by: Ulf Hermann <[email protected]>
* tst_qmllint: add shorthand to enable categoriesSami Shalayel2025-04-171-0/+14
| | | | | | | | | | | | | Add a CallOption struct that allows to control how qmllint is invoked, and an callQmllint() overload that accepts this CallOption struct. Currently it only allows to enable disabled categories. This is useful to test warnings that are disabled by default, for example the "function-used-before-declaration" opt-in category that will be added in a later commit. Task-number: QTBUG-129307 Change-Id: I82b2201e1389dd1f95364109e159eaa5f5b87115 Reviewed-by: Ulf Hermann <[email protected]>
* tst_qmllint: clean callQmllint argumentsSami Shalayel2025-04-171-87/+135
| | | | | | | | | | | | | | | | | | | callQmllint requires so many parameters that it is getting quite unwieldy: move its arguments into a struct, so that its easier to distinguish between actually relevant arguments and unchanged defaulted arguments. Introduce CallQmllintOptions that contain information on how to call qmllint, and CallQmllintChecks that contain information on what tests callQmllint does (currently it can checks autofixes and the return value of qmllint). Remove the QJsonArray* argument and always return the array. Keep the old behavior of not populating the array when a test failure happened to avoid breaking tests with QEXPECT_FAIL(). Change-Id: I9dffbea0dee5033df748beec72abf00e5a141cd5 Reviewed-by: Ulf Hermann <[email protected]>
* DeliveryAgent: clear deviceDeliveryTargets before hover deliveryShawn Rutledge2025-04-161-0/+11
| | | | | | | | | | | | | | | | deliverPointerEvent() and deliverSinglePointEventUntilAccepted() already clear the QQuickPointingDeviceExtra::deliveryTargets list before each event delivery (since a97759a336c597327cb82eebc9f45c793aec32c9 and 262d7eb305e1dea8dac660bec3ccc50193258ea9). deliverHoverEvent() needs to do that too: in case there are a lot of hover delivery targets and the user doesn't move the mouse for a long time, but the scene is continuously updated, flushFrameSynchronousEvents() keeps sending hover events, and this list would keep growing if we don't clear it each time. Fixes: QTBUG-135975 Pick-to: 6.5 6.8 6.8.3 6.9 Change-Id: Ia91e3c977b45fc964228d3aad89938435f437449 Reviewed-by: Fabian Kosmale <[email protected]>
* QQuickMenu: fix infinite loop with Action shortcut in nested sub-menusMitch Curtis2025-04-162-0/+45
| | | | | | | | | | 51ad5091929c7f2c4bab94fab9fa1c20996a6efa forgot to set parentMenu in the loop. Fixes: QTBUG-135965 Pick-to: 6.5 6.8 6.9 Change-Id: I56ad611a6dd6e9f978ce3da5cc28e02d8f2b1a1a Reviewed-by: Santhosh Kumar <[email protected]>
* QtQml: Load pre-registered types if no remote qmldir can be foundUlf Hermann2025-04-156-8/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a potentially remote qmldir we have to wait for it to surface before we load any pre-registered types. The qmldir might contain dependent imports. Once we've exhausted all possible remote qmldir URLs, we can load any pre-registered types. We have to unconditionally insert the import instance at the right place in the import namespace, though. Otherwise the imported types will get re-ordered. There are some pre-existing quirks to this behavior: We only trigger the code that postpones the loading if the QML engine has URL interceptors. Otherwise we load the pre-registered types right away. Changing this to do the right thing and first check the remote locations for any potential qmldirs would be a subtle change in behavior with large potential to break someone's code. We should not do it without a proper migration path. As a drive-by, fix the generation of warnings for unresolved imports. We only want to warn about actually unresolved imports. Previously, it warned about all imports it had to postpone if any of them was unresolved. Amends commit 46429839fedd79244559069bb4235a8b0e7ebf0a Pick-to: 6.9 6.8 6.5 Fixes: QTBUG-135334 Change-Id: Ib86ea58c19d96d2162f6735ce1caf88c562b65e7 Reviewed-by: Fabian Kosmale <[email protected]>
* QQmlBind: Only restore previous state if current state is still activeUlf Hermann2025-04-152-0/+63
| | | | | | | | | | | | | | | | | | | If some other Binding has overridden the one we're currently clearing, we should not restore the previous state. Amends commit e2fa7ab91310ea74c30e9458dfbe20d257578659 [ChangeLog][QtQml] The Binding element now only restores previous bindings or values if its own binding is still active on destruction or changes to its "when" property. If it has been overridden by another Binding element, it will not disable that one anymore. Pick-to: 6.9 6.8 Fixes: QTBUG-134922 Change-Id: Iac2883e7649dc0d2fb2669efa847becbb886ca64 Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: YaNing Lu <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Reject uncreatable value types even if marked as QML_UNCREATABLEUlf Hermann2025-04-152-2/+18
| | | | | | | | | | | | We simply cannot do anything sensible with them. Clarify the warning to say that only object types can be marked uncreatable. Also fix Qt.labs.folderlistmodel. It had such a type. Pick-to: 6.9 6.8 Task-number: QTBUG-135032 Change-Id: Id062908c66c4c4ab15e0deb5c92d0ca7ca447899 Reviewed-by: Fabian Kosmale <[email protected]>
* qmltc: Cleanly reject custom parsed propertiesUlf Hermann2025-04-153-0/+24
| | | | | | | | | | | | Process all properties of custom parsed types and generate errors if the custom parsed properties are actually used. Then print an extra error stating that qmltc does not support custom parsers. Pick-to: 6.9 6.8 Fixes: QTBUG-134206 Change-Id: I37e4f3f8d0ee4e0926c0d64c99a4a521b093a1ab Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
* Tests: include QTest, not QtTestGiuseppe D'Angelo2025-04-15146-148/+211
| | | | | | | | | | | | | Never use module-wide inclusions. They blow up build times. For QtTest this is usually just a typo (QTest was meant instead). Add missing includes as needed. In the diffs I've spotted other huge inclusions (QtQuick, QtQml), but those need more attention. Task-number: QTQAINFRA-7110 Pick-to: 6.9 6.8 Change-Id: I74bf3fe212f50a7a3a6af2b1c80bbcaabc2516d7 Reviewed-by: Fabian Kosmale <[email protected]>