summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Doc: Promote the Multieffect QML type pageAndreas Eliasson2023-03-194-9/+18
| | | | | | | | | | | This QML module, part of the Qt Quick Effects submodule, is not very visible across the Qt Quick pages. Also, inform that this QML type is the successor to the Qt Graphical Effects from Qt 5. Fixes: QTBUG-111481 Pick-to: 6.5 6.5.0 Change-Id: I933bcc196a292a08135bcf77b397b5f7ff5d4827 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
* Doc: Fix example code for QQmlApplicationEngine::objectCreationFailedAndreas Eliasson2023-03-181-1/+1
| | | | | | | | | | The example should use &engine, not &app. Fixes: QTBUG-111881 Pick-to: 6.5 6.5.0 6.4 Change-Id: I434fc602a9f945f3e18b5289f548864c2e9f27e5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Guard against ID-lookup of value typesUlf Hermann2023-03-171-2/+17
| | | | | | | | Pick-to: 6.5 6.2 Task-number: QTBUG-111986 Change-Id: I10657e4176b5f57f3552728d8b2835e74b82bb60 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* SceneGraph: Don't let QSGRenderNode::m_matrix be a dangling pointerAndy Nichols2023-03-173-3/+5
| | | | | | | | | | | | | | | | | Previously QSGRenderNode::m_matrix would be a dangling pointer most of the time. We document it as being valid during both the prepare, and render methods, but it would only be valid during the prepare phase. This was solved with the projectionMatrix by keeping a local copy instead of a pointer. No code was actually using the dangling pointer, but as a preventive measure since we document matrix as being valid also during the rhiRender we now have a local copy in QSGRenderNodePrivate, and manually set the pointer reference for the API, as well as a note to fix this non-ideal situtation in Qt 7. Fixes: QTBUG-97589 Change-Id: Idc0617de579d3d4ce5cc590534445f609adb9d61 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QmlCompiler: Do not generate invalid code on generate_AsUlf Hermann2023-03-171-4/+9
| | | | | | | Pick-to: 6.5 6.5.0 6.2 Task-number: QTBUG-111986 Change-Id: Ib6e7179c20e6c7a4d6fc3a1a17eac550d2bbfa56 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltyperegistrar: Do not guess types with upper case namesUlf Hermann2023-03-171-5/+25
| | | | | | | | | | | | | We generally need to guess value types since there are value types without metaobjects of their own, such as QRectF and QSizeF. However, if they have upper case element names, they are clearly not in that category. Guessing those as value types will make further tools produce follow-up mistakes. Pick-to: 6.2 6.5 6.5.0 Fixes: QTBUG-111986 Change-Id: Ic15ef8c726eb3913c87eb4a300794f321f59fafa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickTableView: implement SelectedTapped correctlyRichard Moe Gustavsen2023-03-171-15/+20
| | | | | | | | | | | | | | | | The current implementation of SelectedTapped allowed the user to start editing when tapping on the _current_ cell. This is not correct, SelectedTapped is supposed to (like the name suggests) let the user start editing when tapping on a _selected_ cell. This patch will change the implementation so that the user can tap on a selected cell to edit it. Pick-to: 6.5 Change-Id: Ice5de9250c23f5f57e71077d4f46d1a3f31e9b80 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make thread affinity apparent in QQuickPixmapCacheMikolaj Boc2023-03-171-49/+114
| | | | | | | | | | | | | | | Introducing a new name for the former QQuickPixmapReaderThreadObject: ReaderThreadExecutionEnforcer, which describes its (sole) purpose, as opposed to the former. Added a thread affinity marker to check threading assumptions in QQuickPixmapReaderThreadObject. Also made an alias for the event ReaderThreadExecutionEnforcer sends to trigger processJobs on the original reader on its thread. Change-Id: I022374775eaa417f8568a7297b44b028db7ff0ee Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Don't needlessly generalize input on SetPropertyLookupUlf Hermann2023-03-171-2/+6
| | | | | | | | If we get a verbatim type as input there, we can just use it. Change-Id: If04c29c3756664718bf482a016f431cc5f26cee5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSPrimitiveValue: Add data(), metaType() and a generic coercion methodUlf Hermann2023-03-174-25/+164
| | | | | | | This allows us to do some more specialized lookups in QmlCompiler. Change-Id: I7947c8e7bccfa57aee949b080a531a88fd47c8af Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlobject_cast: Make it useful againFabian Kosmale2023-03-172-1/+15
| | | | | | | | | | | | | | | | | | | | The Qt 6 implementation of qmlobject_cast simply accessed the metaObject of the object (canConvert -> QQmlMetaObject::QQmlMetaObject(QObject*) -> QOject:metaObject). That would directly cause the creation of dynamic meta-objects, if they weren't created so far. Given that we still didn't get rid of the property-cache in QML, use it to optimize this code path: If the object has some associated QQmlData, retrieve it and check if we have a property cache. If we do, retrieve the first C++ meta object from it. We can safely ignore any dynamic meta-objects as T must be a static meta-object. Then do the normal inheritance check with the first C++ meta-object and T::staticMetaObject. If we don't have a property cache, fall back to the previous implementation (but without the QQmlMetaObject detour). Change-Id: Ie23d1a3dac6bf343ee2bc31e04c4592681ad9995 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QtQml: Check CU for null on isBound()Ulf Hermann2023-03-171-1/+2
| | | | | | | | | | | If the component has an error or was clear()'d its CU will be null. Since isBound() is a public method, it should take that into account rather than just crash. Pick-to: 6.5 Change-Id: I4a3e7417da3c87f6ce7dbb615f984815bc2b0b0b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* doc: Fix native texture interface header nameLaszlo Agocs2023-03-171-0/+5
| | | | | | | Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-95807 Change-Id: I0676fdb9bd7e8312d736bf0f4eb6775415d86296 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Rename cancelled -> cancelledJobs in QQuickPixmapCacheMikolaj Boc2023-03-171-16/+16
| | | | | | | | Thus improving readability, as cancelled might be confused with a cancellation flag. Change-Id: Ib7b24e58458e138ca1f653d5342e3d00f01a0f96 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qquickwidget: Try to initialize rhi on renderSceneGraphDavid Redondo2023-03-171-6/+4
| | | | | | | | | | While d2f895969938b0a80906e9a91553750bbcb717c9 in qtbase makes sure that everything is reset on device loss, initializeWithRhi is only called on next resize or hide/show, so we set deviceLost so it is recreated on the next frame. Change-Id: I70bcf753d26e2660fd0f86d8c7b37206100d59c9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* DelegateModel: handle roleName invalidationFabian Kosmale2023-03-162-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | roleNames are generally guaranteed to be stable (given that QAIM has no change signal for them), except that resetting the model is allowed to invalidate them. DelegateModel did so far not take this into account. Handle this case correctly by snapshotting the current roleNames before the model is reset. Afterwards, if we detect that roleNames has changed, we throw the current model set up away and rebuild everything from scratch – it is unlikely that a more efficient implementation would be worth it. If we detect no changes, we simply use the existing logic to handle the model reset. Note that some views, e.g. TableView do not use DelegateModel if they detect that the model is a QAIM. They require a conceptually similar fix (but can probaly implement this in a more efficient way). Fixes: QTBUG-32132 Fixes: QTBUG-103220 Pick-to: 6.2 6.5 Change-Id: I6874988cf09b8fe75d2e9750d0bf209915554c45 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Models: Allow the accessors to be modified when creating itemsUlf Hermann2023-03-165-25/+24
| | | | | | | | | | | | Pretty much all accessors const_cast themselves already in this case. This requires us to eliminate the global static null accessors, but that is a good thing anyway. Also, drop some further unnecessary const_casts. release() is const. Change-Id: I6cf6544bec67028dfbfb3b2008e84cd646638b60 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Silence some unused-variable and unused-private-field warningAmir Masoud Abdol2023-03-162-3/+9
| | | | | | | | | | | | | | Otherwise, they tend to break the unity build. Since we are compiling with "-Wattributes", and GCC doesn't warn about unused variable, having the [[maybe_unused]] leads to an error, and not having it fails the unity build with other compilers. As a result, we need the condition to ignore the flag, and set it again afterward. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ia7662a0cfc01de7c9188d37449abdd91e6110fa1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QSGBatchRenderer: Fix batching with geometry without index bufferAndy Nichols2023-03-161-1/+1
| | | | | | | | | | | | | | | | If geometry without an index buffer becomes a batch root, it should not be merged with other geometry since an index buffer is required for a merged batch. This should not be very disruptive, as this can only occur under very specific circumstances anyway (custom QSGGeometry used in a scene in a particular order). Fixes: QTBUG-97557 Pick-to: 6.5 6.4 6.2 Change-Id: I6b3845fb988a4bfe2a6f989801741246b8f4fb37 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QV4: Fix formatting options for the search component of UrlObjectOlivier De Cannière2023-03-161-1/+4
| | | | | | | | | | | | | | This fix changes the way the search component of UrlObjects is formatted by passing the correct options to QUrl::query. Namely, the EncodeDelimiters flag is no longer set. This now allows for correct encoding of backslashes in search strings. Amends 6cca731f3e1304ce98f1ec18af42e3bd06001eea. Pick-to: 6.5 Task-number: QTBUG-111014 Change-Id: Iee544dfc7ad6ba374601c8ec4690d11bf07c9b6a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add MethodIndex to meta method index statics in QQuickPixmapCacheMikolaj Boc2023-03-161-29/+36
| | | | | | | | Thus improving readability, as the fields won't be confused with actual methods. Change-Id: I7ff390fffd97042180bc6d9321fb967569e67a93 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use mutex locker in QQuickPixmapReaderMikolaj Boc2023-03-161-49/+49
| | | | | | | | Transition to the QMutexLocker for a more fail-safe and idiomatic approach to locking the mutex Change-Id: I97cfb05e8bddfd4c67b14b1db6bc457eb8e6d4c9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmllocale: fix build when deprecated APIs are disabledYuhang Zhao2023-03-162-4/+10
| | | | | | | | | | Guard the callers of the deprecated APIs with proper macros, otherwise they will case compilation errors when deprecated APIs from qtbase are disabled. Pick-to: 6.5 6.4 Change-Id: Ie25e7424aaccf7175c839ecddbd326a7a5649709 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQuickSelectionRectangle: Use Control to start multi-selection, not ShiftRichard Moe Gustavsen2023-03-161-2/+2
| | | | | | | | | | | | The current implementation would start a multi-selection when holding down the Shift modifier. This is not correct. Holding down Shift is normally done to extend an already active selection. The correct way to do a multi-selection is to hold down Control. Amends 52cbcd947db2219aecb2f6cb59bc6676a7c61e48 Pick-to: 6.5 Change-Id: I5dbb7c88702266e8a396dd0bdcd4fb68ffbbb0c2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* JIT: Add missing {STORE|LOAD}_ACC() to CreateCallContextUlf Hermann2023-03-151-0/+4
| | | | | | | | | | | | | We cannot assume anything about the accumulator register after calling PushCallContext::call(). Also add a note about not needing to re-load the accumulator on ThrowException. Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-111935 Change-Id: I7196585e1d2697c215f4fe87d8d7ac9b98b622a3 Reviewed-by: <carl@carlschwan.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Use qsizetype as index for IndexedBuiltinFunctionUlf Hermann2023-03-153-6/+9
| | | | | | | It's primarily an index into the property roles, which is a QList. Change-Id: Ib3f0000166cae87d3ae0a69db971257e71a0f3e8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Models: Encapsulate members of VDMAbstractItemModelDataUlf Hermann2023-03-152-49/+54
| | | | | Change-Id: I8ee432607c45ad54af248abc60e47902e10cc6cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickPixmapCache: own thread object if not using threaded downloadMikolaj Boc2023-03-151-21/+47
| | | | | | | | | | If threaded download is not used, we rely on async callbacks to drive the download. We can also safely own the thread object since all operations are executed on exactly one thread. Fixes: QTBUG-111892 Change-Id: I17f927f383f7a3a28d26a128b3f9e7ce1dbfe8be Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Software Adaptation: Don't leak QSGRenderContext resourcesAndy Nichols2023-03-151-0/+12
| | | | | | | | | | | | Subclasses of QSGRenderContext are responsible for releasing the resource tracked by the render context on invalidate. I'm not sure the software context will ever have any other resources than QSGTextures, but it doesn't hurt to try and release everything anyway. Fixes: QTBUG-106968 Pick-to: 6.5 6.4 6.2 Change-Id: I58902e1a33c0d3d101e39af3e5f0a18d6820ce98 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update Material SpinBox to Material 3Mitch Curtis2023-03-151-12/+10
| | | | | | | Fixes: QTBUG-111888 Pick-to: 6.5 Change-Id: I239cde2ed258914692354e54e394036d914548e6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Update Material ComboBox to Material 3Mitch Curtis2023-03-151-38/+16
| | | | | | | Fixes: QTBUG-111887 Pick-to: 6.5 Change-Id: I9a518ce4fb3ebc03a792d8bff0f89b2c4bce3a0f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* scenegraph: Remove dead code from Qt 5->6 porting timeLaszlo Agocs2023-03-151-39/+0
| | | | | | | | | | Remove some #if 0 and commented code that was there since the Qt 5.14 days of porting to QRhi. Given that nobody missed it so far, it is unlikely to be relevant. Fixes: QTBUG-86234 Change-Id: I12fed241395cef267f9a0fefcd5e25091cec2f4e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* QML: Insert aliases in inline components when loading from disk cacheUlf Hermann2023-03-1511-553/+624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we did not completely restore aliases in inline components. This was masked by the fact that until recently we failed to load inline components from the disk cache and always loaded them from source instead. To fix this, refactor QQmlComponentAndAliasResolver to work for both, QmlIR and QV4::CompiledData. With QmlIR, it populates the relevant data structures. With QV4::CompiledData, it sanity-checks them. The sanity-checks do incur some overhead, but given recent events, we should err on the side of caution here. Since QQmlComponentAndAliasResolver has received all the fixes we've applied to make inline components work, this should lead to inline components loaded from cache files to work the same way as those compiled from source. In turn, we can drop some methods of QQmlPropertyCacheAliasCreator. Amends commit 131db085a752469e8f19974c2edb3a138d900249 Pick-to: 6.5 Fixes: QTBUG-111766 Fixes: QTBUG-111857 Change-Id: I9cc75e700a5fe5810a866e9aa930b9811368b1b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Customize and update docs for PointHandlerShawn Rutledge2023-03-147-5/+275
| | | | | | | | | | | | | | | | Many of the inherited docs were inappropriate or insufficiently specific to PointHandler. Now we have more snippets with more ideas for how it can be used. As a drive-by, fix a typo in the docs for PointerDeviceHandler::acceptedPointerTypes and add a link to the new PointerDevice page added in e283c05af745210d4a1f6c0aa9c33bf4da23a1e0 Pick-to: 6.2 6.4 6.5 6.5.0 Fixes: QTBUG-74020 Fixes: QTBUG-106878 Change-Id: I028e1577ac5d4ef0b927c94259d6ab25b6028885 Reviewed-by: Doris Verria <doris.verria@qt.io>
* CMake: Add docs for NO_PLUGIN and clarify NO_GENERATE_PLUGIN_SOURCEUlf Hermann2023-03-141-1/+16
| | | | | | | | Fixes: QTBUG-111577 Pick-to: 6.5 6.2 Change-Id: I7f259c3b710d0be16844d159e3204ee2e51f2a06 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Condition particles shaders at build timeLaszlo Agocs2023-03-142-43/+117
| | | | | | | | | | | ...while also specifying 300 es in order to fix some of these shaders on WebGL. If dynamic indexing is rejected in WebGL 1 and WebGL 2 with 100 es shaders, then the only option is to use 300 es shaders with WebGL 2. Fixes: QTBUG-111227 Pick-to: 6.5 Change-Id: I506aa0a7aa6870b888c0f55ad97b99c3e26c31c0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* CMake: Add NO_COMPILER_RUNTIME to qt_generate_deploy_qml_app_scriptChristian Heimlich2023-03-132-0/+8
| | | | | | | | | | | | | | | | | | Provides the NO_COMPILER_RUNTIME boolean option to qt_generate_deploy_qml_app_script(), which forwards to qt_deploy_runtime_dependencies(). On Windows, this option prevents the deployment of compiler runtimes. [ChangeLog][CMake] Added the option NO_COMPILER_RUNTIME to qt_generate_deploy_qml_app_script. Task-number: QTBUG-111741 Pick-to: 6.5 6.5.0 Change-Id: Ic51fc5430e21b8c5aba201d4675a37c9c220a3f2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* shapes: Condition shaders at build timeLaszlo Agocs2023-03-139-29/+12
| | | | | | | Pick-to: 6.5 Change-Id: If04bdfae18d5f9c48d003f41c4ae77d7d4c616d4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Export QQuickWheelEvent privatelyShawn Rutledge2023-03-131-1/+1
| | | | | | | | | | | | | | | | | It's mainly intended for QML use cases: both MouseArea and WheelHandler have wheel(QQuickWheelEvent *) signals. But the QML compiler generates C++, and other use cases are possible. For the signals to be useful in C++, their arguments need to be exported. Besides, the other classes in this file are exported the same way (for example 21b3b74c99e2ee8dedb711ba448066eb308979dc; some were made private in 83e820ba767c2d37600d3536ebcfde18234d2f46). QQuickWheelEvent was added in f2e1be963f885a6030136591414cdbda26d50695 Pick-to: 6.5 Fixes: QTBUG-111230 Change-Id: I448aa633c7e7deb2e5f12e29bcb1c449be00a63d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QmlCompiler: Enforce sanity of type adjustments in basic blocks passUlf Hermann2023-03-115-26/+72
| | | | | | | | | | | | If we cannot properly adjust the types, the result will probably be garbage and we should not try to generate any code. We are double checking the actually received type in the code generator, but if we get a different type at code generation time than we "ordered" at type propagation time, that's not great. The type propagator should already have checked that the types are convertible, after all. Change-Id: I9c20dbd6b4cc8214e780dad9eb4302ca6ef81bac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Fix logic in generate_As()Ulf Hermann2023-03-112-5/+7
| | | | | | | | | | | We want to communicate the input via the 'in' accumulator and the output via the 'out' accumulator, not the other way around. It would be a nice optimization to already read the input as the desired type, but since we only do QMetaObject::cast() and the "optional" Qvariant conversion for the "as" operation we cannot guarantee that the lhs can be read that way. Change-Id: I994e06a02c742ff375cf2edfaaf989adba7d6e90 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qv4codegen: Remove static disable_lookup debug aidFabian Kosmale2023-03-111-7/+5
| | | | | | | | | | | | | This variable, introduced in aabf2196016d96bd171a7d632b6e1cc5622d05ae, allows to turn of the use of lookups in a few places. However, there is no apparent need for doing so, and the commit message of the change that introduced it does not give any reason for it. As the variable is always false, and given that we run the lookup code path by default since quite a while, simply remove it. Change-Id: I62e00739a58fc748a1239087fa0374861ec73e64 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Allow coercing anything to boolUlf Hermann2023-03-102-0/+15
| | | | | | | JavaScript can coerce anything to bool, so should we. Change-Id: Id560e4c1dc10b5432c0cedf3110ad3377bbc5f59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix counting of number of months from one date to anotherEdward Welbourne2023-03-101-8/+10
| | | | | | | | | | | | | QQuickCalendarModelPrivate::getCount() was kludgey and wrong. Rewrite it to use QCalendar::partsFromDate(), thereby bypassing repeat calls to calendrical calculations, document what it's meant to be doing and do that. Fixes: QTBUG-111634 Pick-to: 6.5 6.4 Change-Id: I3bdf0233fc1b170eaeb1948ba74e93f636a29bd7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix multiple object creation in LoaderSanthosh Kumar2023-03-101-1/+1
| | | | | | | | | | | | | | | | | | | QML Loader creates multiple object of same component during initial loading, if sourceComponent is assigned within state configuration and it evaluates to be true. This happens due to the effect of evaluating stage change (here in this case, setting loader source component) during component completion which internally creates component object and makes loader status be ready, even before Loader instantiates object. This patch adds a guard to check loader status and avoids object creation if status is already ready. Fixes: QTBUG-111559 Pick-to: 6.2 6.4 6.5 6.5.0 Change-Id: I6c3456cd3bc35a717c139fbd3670c305304f480a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Fix a broken link to restructured I18N informationLeena Miettinen2023-03-101-11/+16
| | | | | | | | | | Rewrite using the current style and add links to the translation functions. Pick-to: 6.5 6.5.0 Change-Id: I8257d6e371b508e1ab23b0887eaa6316d2240ee0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* tst_snippets: move Line inline component out of PageMitch Curtis2023-03-101-17/+17
| | | | | | | | | | | | | This causes an alias to break when QML_DISABLE_DISK_CACHE is not set (the default). Although it probably should work regardless, it doesn't make sense for the inline component to be in the Page. Amends d648235777fb4d84afc611c6fa47c15b01f0917a. Task-number: QTBUG-111857 Pick-to: 6.5 6.5.0 Change-Id: I58d7234ad8f4e439093eb4ee60c7c9461660568a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix bug when center aligning anchors on items with fractional sizesJan Arve Sæther2023-03-091-10/+2
| | | | | | | | | | | It seems that the old code assumed that all widths and heights were limited to integers (despite that the argument was qreal) Amends 50482f69af0b9392424dfdad5376fcb09be36d46 Fixes: QTBUG-95224 Change-Id: I6d003eb09702828a39cb1172f6c62b7fe240ca60 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QmlCompiler: Use value type ctorsUlf Hermann2023-03-0911-149/+308
| | | | | | | | | | | | | This allows us to do the relevant conversions in a more civilized way, dropping the outputVariantConversion() method. The latter is brittle because you have to manually add it to each instruction, and it uses QMetaType::convert() which is actually not guaranteed to give the same results as a QML type coercion. Task-number: QTBUG-94807 Change-Id: I4d6d05a60beb3b4dfc3da6f0142de25667510904 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix target for qt_deploy_qml_importsVolker Hilsheimer2023-03-091-1/+1
| | | | | | | | Use \keyword instead of \target for proper landing. Pick-to: 6.5 Change-Id: I5ccc8fb3f853e8c65b4797e9b44c0622e1dcf6b4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>