They're simple integral types, for all the special semantics they're
wrapped in.
Change-Id: I80934f3feec94b82a8ccdf5f8320b04b18939348
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
QQuickAbstractButtonPrivate::pressPoint may not be set correctly,
and we don't need it for this purpose anyway in Qt 6, since every
QEventPoint is supposed to remember its own press position.
Task-number: QTBUG-61783
Pick-to: 6.5 6.6
Change-Id: Idd82f3d79b1167a40f28669d15b5974c7d240a9c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
When animating a flickable with pixelAlignment enabled, the vData and
hData move still contain raw floating values.
The viewport and content items will use the pixel aligned values. We
recheck updateBeginningEnd based on when the viewport changes to emit
the atBeginning/atEnd signals.
If the animations speeds are just right, we can have a frame where the
hData.move is not at the end, but the aligned version is. This will
perform the last check in a way that fails the test for being at the
end, and not update again.
This patch uses the same value for the position as the content, aligning
if needed.
Fixes: QTBUG-115081
Pick-to: 6.5 6.6
Change-Id: I58afbe8a79994507e891391cb8f2af7e22380a9b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Url doesn't seem to exist, where as URL is part of one of the web API
extension which we support in QML.
Pick-to: 6.6 6.5
Change-Id: Ieebcf603b8497315fd8039f6b01fbc0f11f1a3a9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
While we shouldn't convert to QVariantMap if only QVariant is requested,
we should convert if QVariantMap is explicitly requested. QVariant can
hold QJSValue which is a better fit for objects with properties.
QVariantMap cannot hold QJSValue. A best effort conversion is still
better than an empty map.
Amends commit 47678c682f.
Pick-to: 6.6 6.5
Fixes: QTBUG-115523
Change-Id: Iaa96809ee411dc0db95311c641c4e3f1f51a6026
Reviewed-by: Amanda Hamblin-Trué <amanda.hamblin-true@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
I'm perpetually confused by this code and need docs for the next time
I try to read it.
The implementation detail that QQuickPixmapData::prevUnreferenced
and nextUnreferenced are used to form a linked list of unreferenced
pixmaps is from 09f07b98dfdaec2e48749768b967a48e588d3f7f (Qt 4.7).
The doc comment for QQuickPixmap is derived from that commit message.
The allegation in that commit message that "QPixmapCache ... can stop
expiring items in some conditions" may have been fixed in qtbase
7ab0bed3a56d46c386e65abc381264c57137cb43 (QTBUG-21359) although I'm not
sure if it's the same bug to which he was referring.
The bogus comment by cache_limit was also not helping: this is not the
same as the limit in QPixmapCache, neither numerically nor in meaning.
It was added in 4e9301e3d5 but
qtbase 1582407fc782c0befd0760633324dd5c206524a1 removed the different
value for embedded platforms.
b99c9490c3 added
QIntrusiveList declarativePixmaps
which is yet another kind of linked list, only to prevent a memory
leak at destruction (QTBUG-22742).
Pick-to: 6.6
Task-number: QTBUG-84314
Change-Id: I60ad33f8748527e91399a844547f7b7be2c931fb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
That makes it more clear which ignoreMessage belongs to which part.
Change-Id: I4c2bcc16b80204c6bb55c18459b7e8b0b1b298be
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
In the presence of incomplete type information we may otherwise conclude
that the value type is QJSValue and generate broken code.
Pick-to: 6.6 6.5 6.2
Change-Id: I533f704a422d0efe8b7b5bb0a170966e9f290b1f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Amends a432970b25
As a drive-by, remove redundant categorized logging output, which
wrongly implied that starting scale could be set from the target scale.
Pick-to: 6.5 6.6
Task-number: QTBUG-76739
Task-number: QTBUG-94168
Change-Id: I1fad79b58fa20e165fd21bc593a27cff8378b7ea
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
If the Date is a NaN, there's no point reporting on the rest of its
failure to match the expected value.
Add a missing semicolon as a drive-by.
Change-Id: I9613d590c5ad9463b4b1b0b76f8b3877dead659c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Otherwise the const wrapper will be swept while the object should still
be alive (and vice versa).
Amends commit d3b3fef5a8.
Pick-to: 6.6 6.5
Fixes: QTBUG-114596
Change-Id: Ib4d8e9f805a229a471ca72f5ff357e3a4c9999a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Method calls often return just QVariant because we cannot be sure that
the method hasn't been shadowed. In order to figure out the right lookup
we should look at the type the type propagator assumed as the base of
the lookup. If the type propagator was assuming a list-length lookup we
need to try and generate a list-length lookup. If the base turns out to
be a QVariant after shadow-checking, the code generation will cleanly
fail (and refrain from generating bad code).
Amends commit 46cc70e2aa.
Pick-to: 6.6
Fixes: QTBUG-115278
Change-Id: I24dcd06161eb1af44450fb663d68a16d89efd6ac
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We cannot just sort the raw values. We have to take the offset into
account. If the array wraps around the end of the allocation, we have to
move it around to be contiguous.
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-58718
Change-Id: I1866b3f271d97352e250d687955af3fc54340334
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
On this line group->currentTime() defaults to 0 if animationInstance of
group is null. This happens to be the value the condition is checking
for and leads to a failed Q_ASSERT(animationInstance) in
animGroupPriv->restartFromCurrentLoop(). Add a check for nullptr to
cover this case.
Amends 0e69268b49
Task-number: QTBUG-68404
Pick-to: 6.5 6.6
Change-Id: I12236be3b42fc6bd2d185943f9e0474655d8a4c9
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If the CLASS_NAME is not specified and the BACKING_LIBRARY exists
we should get the plugin CLASS_NAME from the backing library, but
not from the non-existing plugin target.
Pick-to: 6.2 6.5 6.6
Change-Id: I51ba2290f8f9cb8bcf4217f535c6aa4e676f7293
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If you have many arguments, the argument ranges can overlap. In that
case memcpy is UB.
Pick-to: 6.2 6.5 6.6
Fixes: QTBUG-115320
Change-Id: I54dd4d7762e7278502954b8ac2cb4af1197ce88c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We don't need nested hashes there. A single hash is enough, and we also
don't need to key it by pointers. Keying it by internalName instead
makes the ordering deterministic. We also don't need to duplicate-track
the variable names when outputting the declarations anymore.
Verify that qmlcachegen's output is actually stable by compiling the
entire test data for tst_qmlcppcodegen twice, packaging the generated
code into the resource file system, and comparing it in a separate test.
Pick-to: 6.5 6.6
Fixes: QTBUG-115159
Change-Id: I659661e58a52ed9ff308c83d6c821cf016f2e94e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This silences the scary warnings that appear when the optional
spirv-opt tool is not available:
Failed to run spirv-opt -O c/qsb_spv_temp -o /qsb_spv_temp_out:
Child process set up failed: execve: No such file or directory
Amends be813b9955
Pick-to: 6.6
Change-Id: I29372333cf0df5ca98e261f0ce989da9b8deb610
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
If onSignalHandler is a usage of the corresponding signal, then this
should also be true for property changed signals/handlers. For some
property p, also find onPChanged and pChanged usages (and vice-versa).
Add a heuristic to discern property changed handlers from signals from
property changed signals from etc, which will be also needed for the
renaming operation in qmlls.
Fixes: QTBUG-111414
Change-Id: Idc179a288ef2771c094efadacdeb2a5b5bb89336
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Implement support to find usages of signals defined in QML or CPP and to
find usages of bindings, for the "normal" cases.
"Advanced" cases, which is about using QML objects like Connection or
Binding, will be covered in a follow-up commit.
Finding usages of signals:
Set the semantic scope of a signal's owner inside the signal, to be able
to differentiate between same-name signals of different types during
find usages. This requires to move code from
QQmlDomAstCreator::{endV,v}isit(AST::UiSourceElement*) to
{endV,v}isit(AST::FunctionDeclaration*), such that
QQmlDomAstCreatorWithQQmlJSScope can set the semantic scope in the
signal's MethodInfo during endVisit(AST::FunctionDeclaration*) instead
of endVisit(AST::UiSourceElement*) where the MethodInfo is already not
available on the node stack anymore.
Also implement finding onSignalHandler for signals as part of the
usages, and finding signals when finding usages of the onSignalHandler.
Finding usages of bindings:
Add an "identifier" region to FileLocations of bindings and property
definitions to be able to find the exact location of the property name
inside the property binding/definition. Change the existing tests to
only expect the source location of the property name instead of the
entire property definition.
Add tests for finding usages of signals and bindings and make sure that
functions contain a qqmljsscope in tst_qmldomitem::callExpressions()
and that Qml Object id usages can be found.
Disable a warning about prototypes not being a QmlObject: it is fine if
the prototype is also a QmlComponent.
Task-number: QTBUG-111414
Change-Id: Id6fd04ee7c04293a259588165f13b5ae8c78e9dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Add a set of static helper methods in
src/qml/common/qqmlsignalnames{_p.h,.cpp} to do signal name
manipulations (from signal to signal handler name and back, from
property to property changed signal to property changed handler and
back).
Add tests in tst_qml_common for the helper methods.
ToDo in following commit: replace all implementations of signal name
manipulations out there with the helpers introduced in this commit.
Change-Id: I8e606375839d9eda673da121a60484c5d211f4a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Also, changed one of the example pages to a tutorial
page.
Task-number: QTBUG-115297
Pick-to: 6.5 6.6
Change-Id: Ife1b740523039b9287008a1c5243edfc4c1349d1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Exclude TUs that cause problems in a build where all of
QtQuickTemplate's .cpp files end up in a single unity_0_cxx.cxx. This
should ensure that the build will forthwith not fail because someone
added a new .cpp file in the "wrong" position.
Of course, this is just a snapshot, with my configuration: Clang 15,
Ubuntu 20.04, -developer-build, C++23, -sctp, libc++, ...
Task-number: QTBUG-115140
Pick-to: 6.6 6.5
Change-Id: I2dfee74c517a2e96efb16f39217deabf8580e70e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Exclude TUs that cause problems in a build where all of QtQuick's .cpp
files end up in a single unity_0_cxx.cxx. This should ensure that the
build will forthwith not fail because someone added a new .cpp file in
the "wrong" position.
Of course, this is just a snapshot, with my configuration: Clang 15,
Ubuntu 20.04, -developer-build, C++23, -sctp, libc++, ...
Task-number: QTBUG-115140
Pick-to: 6.6 6.5
Change-Id: Iea1fd344541b966add097a7e0c144a427edabd94
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Exclude TUs that cause problems in a build where all of the library's
.cpp files end up in a single unity_0_cxx.cxx. This should ensure that
the build will forthwith not fail because someone added a new .cpp
file in the "wrong" position.
Of course, this is just a snapshot, with my configuration: Clang 15,
Ubuntu 20.04, -developer-build, C++23, -sctp, libc++, ...
Task-number: QTBUG-115140
Pick-to: 6.6 6.5
Change-Id: I06a1525b8bfe39c2f8c39f33e3d3de533257f4a1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Exclude TUs that cause problems in a build where all of QtQml's .cpp
files end up in a single unity_0_cxx.cxx. This should ensure that the
build will forthwith not fail because someone added a new .cpp file in
the "wrong" position.
Of course, this is just a snapshot, with my configuration: Clang 15,
Ubuntu 20.04, -developer-build, C++23, -sctp, libc++, ...
Task-number: QTBUG-115140
Pick-to: 6.6 6.5
Change-Id: If3cb7c17548710dca3b6111b33a4d3ca70417728
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
meeting summary added in the summary tab, corrected the indentation in main file
Change-Id: I0908bed2e2c2fb12396c5d09d5f615bb99de3c62
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
QQmlDelegateModelPrivate::requestMoreIfNecessary() is called in various
situations, including at startup, which calls QAIM::fetchMore() on the
model if it supports that. But we need to do it in one more case:
when delegates are being reused from the cache, the model could provide
more rows even though we aren't instantiating new delegates.
Amends 1841a9e41d
Fixes: QTBUG-95107
Pick-to: 6.6 6.5 6.2
Change-Id: I5b7ff48345ab78977cb03cfcf58ed96a57c831bd
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The token sequence ??= used to be a trigraph for # until C++17 removed
the concept. Clang warns about their use, though, so escape the two
trigraphs in the test suite by splitting them with a pair of "".
Amends 6cca731f3e.
Pick-to: 6.6 6.5
Change-Id: I455883c4ad92541941fc8fed62277c97c24170db
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The autogenerated list of overviews was adding the \group command which
included all the groups instead of overviews.
The idea here is to categorize the overviews later on once we have
the list of all overviews.
Task-number: QTBUG-114762
Pick-to: 6.5 6.6
Change-Id: I6e09a15bf991a2b6f152f037814ea1910ba7d83f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
This reverts commit ebec92cc5c. This fixes warning:
src/qmlcompiler/qqmlsa.cpp:28: (qdoc) warning: Command '\modulestate' is only meaningful in '\module' and '\qmlmodule'.
The \module the namespace is in is already marked as
'Technical Preview'.
Change-Id: I72b5828e86b7ca2ffa9c05ed785840d24216cc96
Pick-to: 6.6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Use std::unique_ptr instead of QScopedPointer as it looks cleaner while
still providing automatic memory management and ensures that memory is
properly deallocated when the pointer goes out of scope.
Task-number: QTBUG-115222
Change-Id: I9ca93c44fee21ab2847540ab1a32f88cc942d293
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Change-Id: I4377e3bb06e99a7e3b3ed70b1dcb9ddcc6e1ee8b
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
QQuickMenu causes a race condition (crash) on destruction, due to not
removed children listeners in some cases. This patch removes the
listeners manually on destruction.
Fixes: QTBUG-108144
Pick-to: 6.2 6.5 6.6
Change-Id: I4c166c782ae014236970a1f9e145f6862cd7c6a9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>