Those are just as important for modules as for single files.
Pick-to: 6.5
Change-Id: I201d62c61988abc2dfba6300a1cfc355203fec75
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
We only need one line for those. For now we cannot add the version
information because that was forgotten when the qmldir parser was
written.
Pick-to: 6.5
Fixes: QTBUG-110815
Change-Id: Ic922caa6a339a51b905b493e4638ee4d8f737fe6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
There is no reason why internal types cannot have versions.
Pick-to: 6.5
Task-number: QTBUG-110815
Change-Id: I7fa9790dc64dd785fc08ec7b22f68b4f961fdb00
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Move constant MinimumFlickVelocity to a common header and prefix it
to avoid clashes in static builds.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic4178a3e7c1ea930a711c4e04f26edda19ad3efb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Make it a properly prefixed global variable.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ia09072bf6603c3566484f5361b03f1d3a2164be3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When using CMake 3.21 use the new builtin command for copying files if
they are different.
On my macbook pro 2019, according to cmake's 3.25 profiling,
qt6_target_qml_sources execution speed goes down from 1072ms to 122ms
when processing the imagine style qml module.
Pick-to: 6.5
Change-Id: I46c51d03bc16cadacb64c011fdf9899a88332052
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Virtual keyboard uses quick text input as shadow input control attached
on top of the keyboard when the actual input control is obscured by the
keyboard. The shadow input is synchronized by the IM update events sent
by the actual input control.
When the user makes selection or moves cursor on the shadow input
control, the change is synchronized to actual input control with input
method event (QInputMethodEvent::Selection). This all works, except
when there is a selection and the cursor is clicked. The expected
outcome is that the selection is cleared, and it is, but it was not
reported back to input method.
Fix the issue by sending the update in case the selection is cleared.
Pick-to: 6.5 6.4
Change-Id: Ieabc9ee97ad9fe6154d46f302314e3ebdfd10de2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This change just makes the behavior a bit more consistent so that
developers can do things like `stepSize: down.pressed ? downStepSize :
upStepSize`.
Pick-to: 6.5 6.4
Change-Id: I4210f31eaf0e5eda6dc83b369346e16861304fb8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This will be a behavior change for anyone who is still relying on
"touchPoints" to be the signal argument rather than the MPTA property;
so let's put it off until Qt 7 and have a reminder in docs in the
meantime.
Fix autotests to avoid depending on this (just as users should).
[ChangeLog][QtQuick][MultiPointTouchArea] As a reminder: you should
always use formal parameters when writing a signal handler that depends
on an argument, such as MultiPointTouchArea.onPressed, onUpdated,
onReleased, or onCanceled. It gives you an opportunity to name the
argument, to avoid confusion with the touchPoints property, and will
avoid behavior changes if we rename the argument in a future version.
Pick-to: 6.5
Fixes: QTBUG-110906
Change-Id: Ie78dc539f7f6cac660f2e90bf3e4665afed3e3f7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
So that users can see the theme change while the popup is open
Change-Id: I9cac09badc04c5dcace45dadaa9282900b093e17
Pick-to: 6.5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
If a property cannot be found but there are immediate properties in the
surrounding type, that indicates that the construct in question may be
phrased using generalized grouped properties.
Pick-to: 6.5
Fixes: QTBUG-105251
Change-Id: I107132294ba0ca56ff522fc29e7a1972553390bd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
You should use the id-based generalized group form.
Pick-to: 6.5
Fixes: QTBUG-105251
Change-Id: I42edfb03059d3e8c92bfb3c311bf1ed1af7cf70e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add QMLTC_EXPORT_MACRO_NAME and QMLTC_EXPORT_FILE_NAME arguments to
qt_add_qml_module() that allows the user to export qmltc-generated code
from its library. The qmltc-generated code will include the header-file
specified in QMLTC_EXPORT_FILE_NAME and will be exported with the macro
specified by QMLTC_EXPORT_MACRO_NAME.
Leave both options unspecified to not export the code generated by
qmltc.
Describe the options in the documentation and write a test to see if the
class really has an export macro in the generated code:
1) tst_qmltc_qprocess will test if the macro and the header are correctly
inserted in the generated code.
2) tst_qmltc_{no,}diskcache will test if the generated code can still be
used from a static library.
Fixes: QTBUG-106840
Task-number: QTBUG-96040
Change-Id: I554f03bcdf043e8114e42f51a7289a5c00de4f89
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
QQmlMetaType::typeModule only returns a sensible result for modules with
some C++ integration. That is not the case for a pure QML module (qmldir
put into an import path).
Detect the missing module case by instead checking whether addImport
failed to handle the module (either returning false, or returning true
but with unresolved imports).
Fixes: QTBUG-110882
Pick-to: 6.5
Change-Id: I7b25e225e1a34ec91f7ce4d9f4a182a24168ba47
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Add the QML_UNCREATABLE macros in the tests where it is missing.
Change-Id: I58ef5a27e15f0bb99bc94bf819b38aaad3358432
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Writing AUTO_RESOURCE_PREFIX in every qt_add_qml_module call seems
rather pointless.
In addition:
- Add documentation for QTP0001.
- Adjust some of the examples to use QTP0001 policy.
- Improved the error message.
Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: I6e19a491acba97493893bf1953fca3462296c1ea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
With this patch QQuickImageParticle will now properly re-query
the m_rhi member the next time updatePaintNode() is called
Additionally a new (override)
QQuickImageParticle::invalidateSceneGraph()
will call reset() so that potential sub-nodes (e.g. SpriteParticle)
will also be re-created
Last but not least: QQuickSpriteEngine::startAssemblingImage()
was missing to reset it's sprites container
(without that the sprites would pile up and eventually
fail with "Too many animations" error)
Pick-to: 6.5 6.4 6.2
Change-Id: I172fd23ddfac475542aabc6cc17d8fee74f728b2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Adding requestPaint() at the end of invalidateSceneGraph()
will make sure that painting is trigger properly again,
including the (re-)creation of the painting context.
As that request of painting will also recreate the painting
context, it will also allow the creation of a new QSGNode
Without this patch a nullptr will be returned as QSGNode
until a "proper" dirty or update() happens due to property changes
or explicit update calls.
Pick-to: 6.5 6.4 6.2
Change-Id: If1e79d135d3d1f5253cb41a3be1630cfed3865dd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The signal is new in Qt 6.5, so better list it separately (with \since
tag).
Pick-to: 6.5
Change-Id: If83cc1d48f0fdeafbd6a67691170932ec9ea5e04
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
While you can, technically, have URIs that contain '$', or '幽', '霊',
'文', and '字', you really shouldn't.
Amends commit 9e4f6d9211.
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-106074
Change-Id: Ic0f13b6ea2bb704d2bd9f4fa5841aa69a88cd5a7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We should generate type checking code for only strict comparison
of var against null/undefined types or vice versa cases. The non-
strict comparison should be handled elsewhere. Removed pragma Strict to
allow to add warning emitting tests of non-strict comparison.
This amends 6a816a9e0d
Pick-to: 6.5
Fixes: QTBUG-110769
Change-Id: I7f9a457e71a621a005f377216e841bec01667454
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The code generated for QObject comparisons holds for both weak and
strong comparisons. Improve tst_qmlcppcodegen by adding missing weak
comparison tests.
Amends afc7928d1a.
Pick-to: 6.5
Change-Id: Ib6176a39b329e792b81b3d8e8a288dcea074320b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
We don't store a QObject* there anymore.
Amends commit 718f3469f6.
Pick-to: 6.5
Change-Id: Ib3088b8d4966c761af0c3fc815b85092361555b1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Introduce clearCache() method in QQuickAnimatedImagePrivate and use
it wherever applicable to make the code a bit cleaner. Also don't clean
the cache explicitly on setSource(), as it's still cleared in setMovie()
call.
Change-Id: I299b138371534ff091248013ac833d734d8a6607
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The behavior of qmlformat has changed. Update the documentation to
reflect it.
Pick-to: 6.5
Fixes: QTBUG-107213
Change-Id: I7a53ad7b62edce0f078782dbef340236d20c9781
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Bound components can only be instantiated in the context they're
declared in. Adding a context in between before instantiating a
component makes it impossible to bind the component. We want to use
bound components so that we can safely use IDs of other objects from
the same context inside the objects created from the component.
See also commit fc683799fe.
Pick-to: 6.5
Fixes: QTBUG-110697
Change-Id: I8ac9afe13a3d88a4c8e432f5cd701abee8a7f6ac
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If we don't set the date on the date value to be tested, it will be the
current date. If the current date doesn't exist in the month we set, we
get garbage.
Pick-to: 6.5
Fixes: QTBUG-110793
Change-Id: I91db0974e10e11ebce5ddce60f1594285da6fb3f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Fix a bunch of warnings "tst_animatedimage.qml:90:17: TypeError: Cannot
read property 'width' of null" during the test run.
Pick-to: 6.5
Change-Id: I9a1fcd5d8e2ff81768bed1cd1fb94f22940c617b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Partially versioned imports should not be sorted useing the generic
comparison operators. We have to check each component individually.
Pick-to: 6.5
Fixes: QTBUG-110320
Change-Id: Id75ab73ff6a4b5b040b9fcbb426e6bcf893d3d8b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is the simplest way to prevent the garbage collector from
destroying the object while at the same time allowing a manual
destruction.
Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-95895
Task-number: QTBUG-96167
Fixes: QTBUG-91390
Change-Id: Ic3f3146bc555991068ce3367971e050f745d235d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>