Commit Graph

29270 Commits

Author SHA1 Message Date
Mitch Curtis 7ef12715ba ScrollView: ignore filtered wheel events when wheelEnabled is false
The event filter was returning true when wheelEnabled was false,
but wasn't ignoring the event, meaning that propagation of the wheel
event stopped there, and items behind the ScrollView didn't get the
event even if ScrollView wasn't using it.

I'm not sure why it was done this way - the behavior isn't documented
and no auto tests fail when changing it.

Fixes: QTBUG-105164
Pick-to: 6.3 6.4
Change-Id: Ie826ccfc406b77606ef0c6f043dc48f42a18cdc7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-28 16:37:31 +08:00
Fabian Kosmale 6c7da16d5c QQuickAnchors: make all properties FINAL
anchors is only registered as an anonymous tpye, and the backing C++
type is only available via a private header.
Thus, it is impossible for users to have a type derived from anchors,
which might cause shadowing issues when the properties become FINAL.
Consequently, we can safely mark all properties as FINAL.

Pick-to: 6.4
Fixes: QTBUG-104749
Change-Id: Iabb2f2a943ed473a7b25e04dd4c6a928af0cd79b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-28 10:21:16 +02:00
Mitch Curtis 384ba7dfa8 tst_qquickpincharea: fix signal handler parameter injection warning
The warning was:

pinchproperties.qml:45:13 Parameter "pinch" is not declared. Injection
of parameters into signal handlers is deprecated. Use JavaScript
functions with formal parameters instead.

Pick-to: 6.2 6.3 6.4
Change-Id: Iac453ae128cd4ac4b621d9548f439a121f83c407
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-28 12:02:26 +08:00
Qt Submodule Update Bot 69734d24c3 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I2440a3af0392e4fea995a23d673f83c45c827b90
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2022-07-28 04:02:26 +00:00
Fawzi Mohamed 4413e1cc72 qmlls: add warning about missing build directory
Change-Id: I52c71ebe87985b4f3dfc094d003fa322b30262c8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-28 03:03:49 +02:00
Ulf Hermann 054694ee5b Remove QV4:PropertyHash::removeIdentifier()
You cannot actually remove anything from these hashes.

Change-Id: I4b08639f56e3198f48dac1fabfd324cca87c3fdc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-27 22:20:56 +02:00
Andrei Golubev e14b7fe597 qmltc: Fix alias assignment code generation
Fix subtle issue where alias assignment would cause qmltc to generate
direct property set code (doesn't work for aliases since those do not
have "real" properties)

Remove now redundant TODO and identical code path when compiling alias
assignments on types with composite bases (used to work poorly during
prototype times)

Pick-to: 6.4
Change-Id: Ifacf5872ff5432a748fb1ec16c300ec844d65e9a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-27 17:16:56 +02:00
Mathias Brevik 9e537f9ee9 Add baseline test for Dialog
Change-Id: I30618d9f07cfabfc9e779b9f2640ba2dbd113926
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2022-07-27 11:54:48 +02:00
Mathias Brevik f3688e8023 Controls: Add baseline test for GroupBox
Change-Id: I3616e845fbbe1960336e90388497f5bdd562f502
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Mathias Brevik <mathias.brevik@qt.io>
2022-07-27 11:54:48 +02:00
Mathias Brevik 344621cd13 Controls: Add baseline test cases
Change-Id: I9ce5bcf6a78e68b58926f6ab1ed48556b77d92dc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2022-07-27 11:54:48 +02:00
Andrei Golubev 880a9c2426 qmltc: Do not generate duplicated Q_UNUSED() for endInit instruction
We already generate the Q_UNUSED() for input arguments when compiling
the common part of endInit (in QmltcCodeGenerator), no need to repeat
it elsewhere

Pick-to: 6.4
Change-Id: I2c33389ff6f1c2063db80586425b260c764905f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-27 11:54:48 +02:00
Andrei Golubev 2d5f3eb86e Support RegExpLiteral bindings in qmltc
Task-number: QTBUG-91956
Pick-to: 6.4
Change-Id: I02f8c6d1f0d6e4411985ffe3f22fb3c51fb36db6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-27 11:54:48 +02:00
Doris Verria d223f1e3a8 tst_qquickmenu: Unblacklist some test cases on macOS
- SKIP instead of blacklist the popup test on macOS as the cursor
position can't be controlled on this platform.

- Use the TRY variant with isOpened() instead of isVisible() in order
to make sure that all enter/exit transitions are finished before
interacting with the menu. Otherwise, the test can be flaky.

- The subMenuDisabledMouse test expects currentIndex to be set on
mainMenu when the click happens. As we set the currentIndex on a
hover or keyboard navigation event, explicitly generate a hover event
with mouseMove before clicking.

Pick-to: 6.2 6.3 6.4
Change-Id: I7eba20a6b25f2e48a66145774539523def7142e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-27 11:54:48 +02:00
Doris Verria 4a6e7cec99 iOS Style: Don't show progress if value is 0
Pick-to: 6.4
Change-Id: I29a29a8b366fd810c41dc8e00e752824d02cd79e
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-07-27 11:54:48 +02:00
Mitch Curtis 86582e456f Doc: explain which default styles are used on which platforms
Task-number: QTBUG-105149
Pick-to: 6.2 6.3 6.4
Change-Id: I6af546330ee71bb43d7feb3e47936156e644f75a
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-07-27 14:50:30 +08:00
Fabian Kosmale 9bcd137da0 Avoid target name conflict
The qmlqtimeexampleplugin exists as a target name both in examples and
in a test; rename the one from the test.

Change-Id: I21b68f7d6228ceaee49ba28e55516b5b10ffce3a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-27 00:31:42 +02:00
Fabian Kosmale 9c8e04f989 tst_qmllscompletions: Correctly handle test failures
testlib's VERIFY and COMPARE macros only work in the function directly
invoked by the test framework.

Temporarily use a copy of the upcoming QTEST_CHECKED marco from testlib
to check that the indirectly called functions actually behaved
currently.

Moreover, move the call to the clean function into a scope guard, so
that it also will be called when the callback returns early due to
failed testlib change – otherwise, we'll end up waiting until the
timeout in QTRY_COMPARE_WITH_TIMEOUT.

Pick-to: 6.4
Change-Id: I371c021f55f11e32950b12a57cf52ad0edb1fd7b
Reviewed-by: Moody Liu <mooodyhunter@outlook.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-07-26 22:31:42 +00:00
Fabian Kosmale e6e19d50a3 Host environment doc: Improve chances to find ?. and ??
Pick-to: 6.2 6.3 6.4
Change-Id: If00363ef80d38c1fc61aadc0f77dba90867d2768
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-07-26 22:31:42 +00:00
Ulf Hermann 6ea2a1cdb7 QQmlListAccessor: Accept QQmlListProperty
So far we have only accepted QQmlListReference. However, we can also
pass a QQmlListProperty around as value.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105137
Change-Id: I7d4cd3048b62594298f91013c4cda5ec864a28df
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-07-26 21:17:28 +02:00
Volker Hilsheimer aa9412615b Fix warning from iterating over references
Apple clang says:

error: loop variable 'kv' is always a copy because the range of type
'QtPrivate::QKeyValueRange<const QHash...> &>'
does not return a reference [-Werror,-Wrange-loop-analysis]

Change-Id: I4dc43805d3d3f723e5ec8cc504969cda3d99fb43
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 15:32:35 +02:00
Fabian Kosmale 317ae95bc1 QQuickItem: make map(From|To)(Item|Global) type-safe in QML
Instead of exposing a QQmlV4Function* overload, we can expose an
overload set to the engine. We do not gain anything from using
QQmlV4Function*, as we otherwise would need to manually parse the
arguments we got and dispatch to the correct internal function.

Unfortunately, we can only deprecate the QQmlV4Function* overload, not
outright remove it: While no public API allows creating a
QQmlV4Function* object, and passing a null pointer would lead to an
immediate crash, it is possible to write a Q_INVOKBALE that forwards its
argument to one of the existing functions. That could then be used in
QML. Thus, we can only deprecate the function in Qt 6.

We make the new overloads public to ensure that the methods get found by
the engine even after the engine ignores private invkoables (compare
QTBUG-105136).

Task-number: QTBUG-105139
Change-Id: I6af2c69f4bd2b70ae45936138808313421085b01
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-26 08:34:49 +00:00
Andrei Golubev 38d9bf60ba qmltc: Fix import namespace code generation
Fix subtle issue where an import namespace would become part of the
generated C++ class name without modifications (so with '.'). Preserve
the namespace for the time being just to make the generated code more
verbose (e.g. consider mixing QQ.Text and ZZ.Text in the same file)

Change-Id: I3d409988ae136c272aac6a4eab287a7221f88450
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 10:34:49 +02:00
Andrei Golubev 1453650419 qmltc: Acknowledge BINDABLE-only properties
Task-number: QTBUG-91956
Change-Id: I4c34ccd9d6d5cf4c6a6c1b54e67374515e67861a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 10:34:49 +02:00
Andrei Golubev 9ec46f271a Revise build to source dir mapping for QML tooling
Instead of doing build file path to source file path mapping for each
QML file, we could store qml module prefix to qml module output
directory mapping instead. This reduces the produced qrc size and makes
it more convenient to work with

Do a clean separation at the QQmlJSImporter level to prevent using
resource file mapper for build directory path resolution

Amends 7f567e6a42

Change-Id: If984abada1d39c386af5712af778eb29956e0537
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 10:34:49 +02:00
Andrei Golubev ca68b0cde7 qmltc: Use QMetaObject hierarchy as reference for meta index calculation
qmltc needs to compute a QMetaProperty index ahead of time when creating
property bindings. This procedure has to acknowledge that extensions
exist

Change-Id: I7bf6b6c558ce78e0fec5ee880bc4d39a79fe5640
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 10:34:49 +02:00
Mitch Curtis 10c475624c Blacklist flaky tst_QQuickListView2::flickDuringFlicking test on macOS
Task-number: QTBUG-105190
Pick-to: 6.2 6.3 6.4
Change-Id: I2c616c84059021e053b89aa3505510816021d472
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 16:34:49 +08:00
Mitch Curtis 8706661b3d tst_QQuickListView2::flickDuringFlicking: improve failure message
Use QTRY_VERIFY2 to show the actual contentY upon failure.

Task-number: QTBUG-105190
Pick-to: 6.2 6.3 6.4
Change-Id: I387d92cbc33e2aab67f72219f3354adbd537c334
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-26 16:34:49 +08:00
Mitch Curtis 44645d8c38 testbench: revert debugging code
This was accidentally left in
as part of e987d60297.

Pick-to: 6.2 6.3 6.4
Change-Id: I918aaf18a80d8460a357a2d097f02ee9917e33d5
Reviewed-by: Doris Verria <doris.verria@qt.io>
2022-07-26 13:24:27 +08:00
Ulf Hermann 00e95e3506 V4: Allow conversion from string to QByteArray when setting bindables
We allow it everywhere else, too.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105044
Change-Id: I714e5d501a780310791523c5f35a87681c69b1fb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-25 20:31:21 +00:00
Thiago Macieira 268d40b9f7 Remove #include qvariant_p.h
It isn't used.

Change-Id: I3859764fed084846bcb0fffd1704497a9998d30e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-25 10:36:41 -07:00
Ivan Solovev 1e7a582d84 QQmlDebuggingEnabler: guard deprecated constructor definition
... to prevent compilation errors when built with
QT_DISABLE_DEPRECATED_BEFORE >= 0x060400

Task-number: QTBUG-104950
Pick-to: 6.4
Change-Id: Id3d2528ed195ca2ad1da51f40fe81cb05884201b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-25 16:27:19 +02:00
Ivan Solovev 156f1b80e7 QQmlMetaType::registerPluginTypes - fix unused variable warning
... when compiling with QT_DISABLE_DEPRECATED_BEFORE >= 0x060300.
This warning is treated as error in some configs, so simply use
Q_UNUSED() on the variable.

Task-number: QTBUG-104950
Pick-to: 6.4 6.3
Change-Id: Id5d06ea8fb0a89cc28a8519b443f8272b4417aa5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-25 16:27:16 +02:00
Ulf Hermann aa553318d4 Fix precedence between JS and QML scopes
In case of a JS context, we need to do the JS lookup early in order to
override imports with locally defined functions.

[ChangeLog][QtQml][Important Behavior Changes] The precedence between
imports and locally defined functions and variables in JavaScript files
has been fixed. If you import a JavaScript file from a QML file, the
functions inside the JavaScript file should obviously override anything
imported from the QML context. This behavior has been restored.

Pick-to: 6.4
Task-number: QTBUG-91687
Change-Id: I119e3109f96ffad7455daaf1a5f17bad31fa8e33
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-07-25 12:26:07 +02:00
Maximilian Goldstein 7f6960efde Qt6QmlMacros: Add _qmllint_module target
Allows for linting any QML module by simply calling ${target}_qmllint_module
on it.

Change-Id: I71cbb082e28824a2b4afabdb5764b3f4c4d8eec1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-25 12:26:06 +02:00
Maximilian Goldstein 34d52f8b2c qmllint: Implement module linting
This change allows for modules to be linted via the -M flag.
This will check whether an individual module has a sound qmldir and
qmltypes. It will also verify whether all its types and the types of
properties can be resolved.

It does not lint individual QML files.

[ChangeLog][qmllint][New Feature] Individual modules can now be linted
via the -M option

Fixes: QTBUG-103264
Change-Id: I3ced4b0bc05358e9216c9819f1dca67af909405e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-25 12:26:06 +02:00
Fawzi Mohamed 29c552d363 qqmljs.g: improve performance avoiding reference counted container
As detected in Creator by hjk:
Detaching the rawString_stack alone shows up at 0.85% when loading
Creator inside Creator. One write access is actually used from
qmljs.g:593, so making the whole function const would need more work.

Take a short cut and replace the unneeded reference counted container
with a non-reference counted one.

Change-Id: I480d539f532f9dbfbb0ddef986a7177dfca9b173
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-25 10:26:06 +00:00
Andrei Golubev 2f4935289e qmltc: Acknowledge group/attached properties have objects in QmlIR
Group and attached properties have QmlIR::Objects associated with them.
However, qmltc's object index calculation ignores groups/attached types.
Fix this, making object index calculation aligned for implicit
components

Fixes: QTBUG-104780
Pick-to: 6.4
Change-Id: I377d3eab714d0e9618ac2ef84c2738b45ad3b6cc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-25 12:26:06 +02:00
Mitch Curtis 6c4c8665c5 macOS: Add Dialog and DialogButtonBox
This fixes the issue where Fusion style Buttons were displayed
by DialogButtonBox for its standardButtons.

We need to provide our own implementations of Dialog and DialogButtonBox
to ensure that the correct files get picked up.

The implementations themselves are almost identical copies of the Fusion
style's, with some imports removed.

The Fusion style is the macOS style's fallback.

Fixes: QTBUG-104658
Pick-to: 6.2 6.3 6.4
Change-Id: Ib7958565ee62f6f4286f87298ab98209e916b6b0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-25 14:20:30 +08:00
Shawn Rutledge 90d3fac73a TextEdit: selectByMouse default=true, but not on touchscreens
When you drag a finger across a TextEdit, it should not select text.
- your finger probably covers several characters, so you can't see where
  you're selecting until afterwards
- if the item is in a Flickable, flicking by touch should be prioritized
- if flicking happens, the text cursor should not move; but to avoid
  losing too much functionality, we allow it to move on release, if
  the TextEdit gets the release (i.e. if it still has the exclusive
  grab)

So now we distinguish mouse events that are synthesized from non-mouse
devices and avoid mouse-like behaviors as described above, but there is
no behavior change if the event comes from an actual mouse or touchpad.

Since most users want selecting text by mouse to "just work", and an
actual mouse is precise enough to do so, and dragging a Flickable with
the mouse is unintuitive (since most UIs don't allow it and most mice
have wheels), selectByMouse now defaults to true, and has the stricter
meaning that its name implies. To select text on a touchscreen, the
end-user needs to rely on text-selection handles, which are provided on
touch-centric mobile platforms, and could also be implemented from
scratch if someone builds a custom text field using TextInput.

In QQuickPressHandler::mousePressEvent() we give the original event's
device to the delayed press event, now that we check the device to
distinguish "real" mouse events from those that are synthesized from
touch.

[ChangeLog][QtQuick][TextEdit] The selectByMouse property is now enabled
by default, but no longer enables selecting by dragging your finger
across text on a touchscreen. Platforms that are optimized for
touchscreens normally use special text-selection handles, which interact
with Qt via QInputMethod.  You can opt out of the behavior change by
using an import version < 6.4.

Pick-to: 6.4
Task-number: QTBUG-10684
Task-number: QTBUG-38934
Task-number: QTBUG-90494
Task-number: QTBUG-101205
Change-Id: Ia96f53cd7c6db5f995aab5505f61c13f9a4c4c0a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-23 00:37:07 +02:00
Ulf Hermann c2805daaa5 QmlCompiler: Recognize script types when looking up members
If you import a module with a prefix, you can use its scripts as members
of that prefix.

Pick-to: 6.4
Fixes: QTBUG-104701
Change-Id: I35f79005ea793f501e782e748f7ad5badd3d75ef
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-22 21:30:16 +02:00
Ulf Hermann 1969a10821 QmlCompiler: Support conversions between QString and QByteArray
Pick-to: 6.4
Fixes: QTBUG-104702
Change-Id: I80d3a28e17751d440ec4bea4c7be0d09c935fa19
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-22 21:30:12 +02:00
Andrei Golubev 8d0adee3b3 qqmltypecompiler: align runtime function table order to qmlcachegen
When we write runtime functions to compilation unit at run time, the
order of the functions in the unit (often) differs from the order of
functions in the unit produced ahead of time by qmlcachegen and friends.
Additionally, the order also differs from what qmltc expects (and
qmlcompiler library in general)

Fix the order by simplifying the procedure of JS code generation when
we create the compilation unit at run time: new logic just goes over
the objects in the document linearly, instead of relying on bindings
(which are known to be out of order w.r.t. AST)

Change-Id: I4070b9d061f03c4c76d03120654ad3f30725493a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-22 16:38:42 +02:00
Doris Verria 76d992431e tst_qquickmenu: Fix click position and wait for menu opened() signal
- When clicking on the menu, take into account the menu's coordinates
as this may not always be (0,0) depending on the style-specific margins.

- Wait for the menu enter transitions to finish before trying to
interact with it, otherwise it leads to flakiness.

- Explicitly set the overlap property to 0 when testing the submenus
as the test relies on the menuItem to be clickable and not hidden by
an overlapping subMenu item.

Pick-to: 6.2 6.3 6.4
Change-Id: I561f47e69b2c9ee12c46f6accacd06e22b448df5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-22 10:31:41 +00:00
Doris Verria 9ab8117aaf iOS Style: Fix button icon color
Set the color accordingly depending if it's a flat button or not.

Pick-to: 6.4
Change-Id: Ic015906043afeda08c5ad9a65670b89ec36057e1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-22 12:30:58 +02:00
Ulf Hermann c02b0e529a Qml: When cloning a stack frame, also clone its instruction pointer
Otherwise we get an out of range access when looking for the line
number. To be extra safe, we also add another guard against this to the
lineNumber() function.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-90466
Change-Id: I4d9cb52ecba2631696537f02a3c1b75c3658ceb8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-22 09:08:25 +02:00
Tasuku Suzuki 9e03741e54 Doc: fix links for ways to initialize required properties
https://doc.qt.io/qt-6/qtqml-syntax-objectattributes.html#required-
properties

Pick-to: 6.4 6.3 6.2
Change-Id: I649a0335ee8555e081376ef51b20ad260529b493
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-22 03:31:58 +09:00
Fabian Kosmale 0b5192d77d Q_IMPORT_QML_PLUGIN: put documentation into correct place
It needs to relate to QQmlEngineExtensionPlugin, not
QQmlExtensionPlugin which is obsolete and does not show
up in the documentation.

Pick-to: 6.2 6.3 6.4
Change-Id: Ia3f685c07040213df86dd6bc38f105929071fff3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-21 17:32:58 +02:00
Fabian Kosmale 610f10b74b Mention Q_IMPORT_QML_PLUGIN in qt_add_qml_module docs
To increase the chance of finding it.

Pick-to: 6.2 6.3 6.4
Change-Id: Id71267e887d3799d8dc50858942d1c37557a8b82
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-21 17:32:58 +02:00
Fabian Kosmale 2c31d25a44 QQuickState::when: handle QJSValue properties correctly
If one assigns a binding whose evaluation results in a QJSValue, care
must be take to correctly convert it into a bool. Instead of directly
using QVariant::value<bool>, one needs to first extract the QJSValue,
and only convert it to bool afterwards.
This is necessary due to the custom binding evaluation we're doing to
avoid state oscillation.
Amends a8c729d839.

Fixes: QTBUG-105000
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I4b093b48edecf9e0f09d2b54d10c2ff527f24ac3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-21 17:32:58 +02:00
Maximilian Goldstein b00f5f49b9 imports/builtins: Add qlonglong and qulonglong stubs
We sometimes expose q(u)longlong to QML despite the fact you can only
pass them around in variants. Add these placeholder types to satisfy
qmllint for now until we fully support these types.

Change-Id: I4c62cee8a4cfc6015f7b76884100d4a675416571
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-21 17:32:58 +02:00