Commit Graph

30450 Commits

Author SHA1 Message Date
Ulf Hermann c2fd73b516 qmltyperegistrar: Do not guess types with upper case names
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>
2023-03-17 20:57:14 +01:00
Richard Moe Gustavsen bf12f5efa4 QQuickTableView: implement SelectedTapped correctly
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>
2023-03-17 20:57:14 +01:00
Santhosh Kumar 025fca60f5 Update quick control baseline test cases
Update baseline control test qml file with construct that can reflect
dark and light mode changes.

Change-Id: Ib52ecacab66a449dda825804c15cb74cfb3dbaa0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-17 20:57:13 +01:00
Mikolaj Boc aa7d0d0ee7 Make thread affinity apparent in QQuickPixmapCache
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>
2023-03-17 15:01:15 +01:00
Ulf Hermann 3957c55f86 QmlCompiler: Don't needlessly generalize input on SetPropertyLookup
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>
2023-03-17 15:01:15 +01:00
Ulf Hermann 53998de985 QJSPrimitiveValue: Add data(), metaType() and a generic coercion method
This allows us to do some more specialized lookups in QmlCompiler.

Change-Id: I7947c8e7bccfa57aee949b080a531a88fd47c8af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-17 15:01:15 +01:00
Fabian Kosmale 677cd24de6 qmlobject_cast: Make it useful again
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>
2023-03-17 14:01:14 +00:00
Ulf Hermann 51c6db3f3d QtQml: Check CU for null on isBound()
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>
2023-03-17 15:01:14 +01:00
Laszlo Agocs e936e466a5 qml tool: Fix incorrect mapping of --transparent to MSAA
Change-Id: Ief9f12c1b3dfab928b110278c1d49abb1028efe0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-03-17 12:12:52 +01:00
Laszlo Agocs 3bc05bf7f4 doc: Fix native texture interface header name
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-95807
Change-Id: I0676fdb9bd7e8312d736bf0f4eb6775415d86296
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-03-17 12:12:51 +01:00
Mikolaj Boc 19f2e36eb8 Rename cancelled -> cancelledJobs in QQuickPixmapCache
Thus improving readability, as cancelled might be confused with a
cancellation flag.

Change-Id: Ib7b24e58458e138ca1f653d5342e3d00f01a0f96
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-17 12:12:05 +01:00
David Redondo a142f83575 qquickwidget: Try to initialize rhi on renderSceneGraph
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>
2023-03-17 08:52:10 +01:00
Fabian Kosmale 837c2f18cd DelegateModel: handle roleName invalidation
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>
2023-03-16 22:39:00 +01:00
Ulf Hermann e3f62a876b Models: Allow the accessors to be modified when creating items
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>
2023-03-16 22:39:00 +01:00
Amir Masoud Abdol 32b49e1a38 Silence some unused-variable and unused-private-field warning
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>
2023-03-16 22:39:00 +01:00
Oliver Eftevaag ef7c39ecf5 Gallery example: translate all user facing strings
This patch wraps user facing strings inside qsTr()

Task-number: QTBUG-110989
Pick-to: 6.5
Change-Id: I3c5220ba7b552101c006d10c4c86efe8c2b8843c
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-16 16:21:34 +01:00
Andy Nichols f9e95c9d44 QSGBatchRenderer: Fix batching with geometry without index buffer
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>
2023-03-16 16:00:06 +01:00
Andy Nichols 4db97d57a9 scenegraph: un-blacklist the render autotest on Android
The tst_scenegraph render tests were disabled for Android because they
were failing in CI. This appears to mostly be related to Android devices
having non-integer scaling factors, which causes issues with the render
test as it tests pixel color values derived from QML coordinates.

Most of these issues can be resolved by having the color sample function
round it's floating point values instead of implicitly flooring them
when they are converted to int values.

The render_bug37422 test was failing because the .qsb file was not
handled correctly as test data, so that was converted to use the new
syntax that builds the .qsb file at build time.

The render_OutOfFloatRange test still remains problematic by design on
system with non-integer scaling factors so is disabled when that is the
case.

Fixes: QTBUG-102589
Pick-to: 6.5
Change-Id: I3cae5c9700ef0d5acf2cce46518576de99717c99
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-03-16 15:59:37 +01:00
Olivier De Cannière af4cd4763a QV4: Fix formatting options for the search component of UrlObject
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 6cca731f3e.

Pick-to: 6.5
Task-number: QTBUG-111014
Change-Id: Iee544dfc7ad6ba374601c8ec4690d11bf07c9b6a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-16 15:56:02 +01:00
Mikolaj Boc 1fdca936fb Add MethodIndex to meta method index statics in QQuickPixmapCache
Thus improving readability, as the fields won't be confused with
actual methods.

Change-Id: I7ff390fffd97042180bc6d9321fb967569e67a93
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-16 15:04:29 +01:00
Dennis Oberst c5daa8cd8f File System Explorer example: Add to qmake targets
Amends 213e932e13.

Task-number: QTBUG-108289
Change-Id: Idd1012761579faae76a8b9b22deb7e51c93a4cd0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-16 14:03:21 +00:00
Mikolaj Boc 0434e294c3 Use mutex locker in QQuickPixmapReader
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>
2023-03-16 12:24:07 +01:00
Yuhang Zhao e70706de7d qmllocale: fix build when deprecated APIs are disabled
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>
2023-03-16 19:16:32 +08:00
Richard Moe Gustavsen 2da7c0441a QQuickSelectionRectangle: Use Control to start multi-selection, not Shift
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 52cbcd947d

Pick-to: 6.5
Change-Id: I5dbb7c88702266e8a396dd0bdcd4fb68ffbbb0c2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-16 07:34:39 +00:00
Ulf Hermann 15ec024152 JIT: Add missing {STORE|LOAD}_ACC() to CreateCallContext
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>
2023-03-15 19:33:09 +01:00
Ulf Hermann 1fbed64151 QML: Use qsizetype as index for IndexedBuiltinFunction
It's primarily an index into the property roles, which is a QList.

Change-Id: Ib3f0000166cae87d3ae0a69db971257e71a0f3e8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-15 19:33:09 +01:00
Ulf Hermann e3f357bf6a Models: Encapsulate members of VDMAbstractItemModelData
Change-Id: I8ee432607c45ad54af248abc60e47902e10cc6cb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-15 19:33:09 +01:00
Amir Masoud Abdol a2b8a0940f Replace the usage of AUTO_RESOURCE_PREFIX with QTP0001 policy
Change-Id: Ia31ba1483ada2adaec5773ca92322b96f2f57c17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-15 19:33:09 +01:00
Mikolaj Boc 38e113547a QQuickPixmapCache: own thread object if not using threaded download
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>
2023-03-15 19:33:09 +01:00
Andy Nichols f1b188df13 Software Adaptation: Don't leak QSGRenderContext resources
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>
2023-03-15 14:25:25 +01:00
Bumjoon Park 354e727c40 MouseArea example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5 6.5.0
Change-Id: I379b3fe961c4491ab29ae8f09fc2e53c8f405c5e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-15 17:13:56 +09:00
Mitch Curtis ed2710466b Update Material SpinBox to Material 3
Fixes: QTBUG-111888
Pick-to: 6.5
Change-Id: I239cde2ed258914692354e54e394036d914548e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-03-15 14:00:07 +08:00
Mitch Curtis 846a4ebf26 Update Material ComboBox to Material 3
Fixes: QTBUG-111887
Pick-to: 6.5
Change-Id: I9a518ce4fb3ebc03a792d8bff0f89b2c4bce3a0f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-03-15 14:00:02 +08:00
Laszlo Agocs 976324175b scenegraph: Remove dead code from Qt 5->6 porting time
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>
2023-03-15 00:08:43 +00:00
Ulf Hermann 2d7fe23b41 QML: Insert aliases in inline components when loading from disk cache
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 131db085a7

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>
2023-03-15 01:08:43 +01:00
Shawn Rutledge 4c6d0b2bf0 doc: Customize and update docs for PointHandler
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 e283c05af7

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>
2023-03-14 21:15:15 +00:00
Ulf Hermann f0f274e354 CMake: Add docs for NO_PLUGIN and clarify NO_GENERATE_PLUGIN_SOURCE
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>
2023-03-14 09:30:08 +00:00
Laszlo Agocs 15662b6a1a Condition particles shaders at build time
...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>
2023-03-14 07:44:23 +01:00
Christian Heimlich 0a0f777821 CMake: Add NO_COMPILER_RUNTIME to qt_generate_deploy_qml_app_script
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>
2023-03-13 11:27:03 -05:00
Laszlo Agocs bab8e70599 shapes: Condition shaders at build time
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>
2023-03-13 15:23:25 +01:00
Shawn Rutledge c6558b3c09 Export QQuickWheelEvent privately
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
83e820ba76).

QQuickWheelEvent was added in f2e1be963f

Pick-to: 6.5
Fixes: QTBUG-111230
Change-Id: I448aa633c7e7deb2e5f12e29bcb1c449be00a63d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-13 06:23:16 +01:00
Ulf Hermann fc2cbdc660 QmlCompiler: Enforce sanity of type adjustments in basic blocks pass
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>
2023-03-11 20:31:53 +01:00
Ulf Hermann 045b1d0cf4 QmlCompiler: Fix logic in generate_As()
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>
2023-03-11 11:27:02 +01:00
Shawn Rutledge 223f1d45cc tst_qquickcanvasitem: wait for canvas before creating a context
Hopefully this reduces flakiness in CI, following the suggestion from
the error message:

Unable to use getContext() at this time, please wait for available: true

Pick-to: 6.2 6.5
Task-number: QTBUG-41043
Change-Id: I3710163cb197170e590f8fd7d188fa62f32ea649
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-11 05:05:24 +01:00
Fabian Kosmale cc07ee38be qv4codegen: Remove static disable_lookup debug aid
This variable, introduced in aabf219601,
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>
2023-03-11 05:05:24 +01:00
Ulf Hermann ec410555ad QmlCompiler: Allow coercing anything to bool
JavaScript can coerce anything to bool, so should we.

Change-Id: Id560e4c1dc10b5432c0cedf3110ad3377bbc5f59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-10 23:42:49 +01:00
Qt Submodule Update Bot b60b539dbd Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I37d5cfdbe257b8dd18c2e627318c76ec43ff40d4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-03-10 22:42:49 +00:00
Fabian Kosmale e0c4a5ecf9 examples: Remove shell example
We did not document it anywhere, the code is rather dated, and if we
want to promote QML as a scripting engine/an interpreter, we would need
to invest quite a bit more effort into a showcase.

Thus, remove the example for now.

Pick-to: 6.5
Task-number: QTBUG-110649
Change-Id: Ie23b26379e7ea72271d793a6928a3757cde2cb12
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-10 16:37:11 +01:00
Edward Welbourne 17d0bf258b Fix counting of number of months from one date to another
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>
2023-03-10 11:17:17 +01:00
Oliver Eftevaag e61d555a6d Shapes example: adhere to guidelines
- Fix all qmllint warnings.
  (except for main.qml, interactive.qml, and sampling.qml)
- Translate user facing strings when it makes sense to do so.
- Mark readonly properties as 'readonly'.
- Avoid binding on multiple properties on a single line.
  (except for tiger.qml).

Pick-to: 6.5
Change-Id: Idbf8a472ca5ba5385d1368aadd608e95231a07f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-10 10:08:14 +01:00