| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
Qt 6.5.8-lts release
Conflicts solved:
dependencies.yaml
Change-Id: Id2eeb915139bdd1943ffc498173db540f22ca2f3
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
You can always access a scoped enum in a scoped way in QML, no matter if
the type it belongs to enforces scoped enum access. Read the respective
flag separately and don't mix it in with the scopedness of the actual
enums.
Amends commit 7da544e862a92cc0a9d97cbed68a35c532699116
Pick-to: 6.2
Fixes: QTBUG-127308
Change-Id: I167602d44c8cea874dc39614fc6726a72e66c007
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 96b29e720c81eef176d49d9fc74f04c87ecd9abd)
(cherry picked from commit 290336814f5e57f3ec5c8e9cfc414fbdae0802c7)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4278f024612cc54402192ba332f4c97b2a8a9195)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Amends 56c16d0e9770b39df142ba946357562be6b9731c that only ignores
"normal" bindings from warnings in custom parsed contexts, and also
ignore list bindings from custom parsed contexts.
Change-Id: I66538ddaac49686a5ad6b6560ddbdbd50bebb717
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 11de566dabcb1204dbaf96ee867d72d0952ccfa5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a561e44ac4a84aa389deb4fe79c2c810852398e3)
(cherry picked from commit 81c12941e498a162d01f212a6b4ae4f2bf276944)
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
Qt 6.5.7-lts release
Conflicts solved:
dependencies.yaml
Change-Id: I8fbe9c1606825b726adf95e69a4fa86e2196f4e8
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This can lead to crashes in static analysis passes when they try to use
the resolver.
Change-Id: I2f7951374a3aa6bd38ef93333b97b08d9a46dd13
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit cc87c4ade4bde5cf3dac617049f539e3361d7309)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit aca26a0bd0c1ce145b5b3841f89f3e989fc5f654)
(cherry picked from commit 44bcd9936c2d3709eb2496f02e481a82b3434373)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The resourceFileMapper doesn't expect ':' in front of its paths.
Amends 5860c9c12c1c948ce1498da30581bfd5b9c05988
Fixes: QTBUG-124498
Change-Id: Icf837708ff6fc5153009bafbf1b98a75a3cfba8e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 001cb7bfb1a2815cad912ce1b5b9d4d1cef30e01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 943633724e2a2731ccfc4ce35766e442c23c41bc)
(cherry picked from commit c6502fcf891173d5c3476b7857b87fd7fde508c4)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They may contain backslashes.
Fixes: QTBUG-125393
Change-Id: Ifd8c97c44b036ab64a221775a7fe6316445f6cf8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9b784345795984878d2938d6903e7c87ae7f0778)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit e0689651d3d512b9ec008985d6cb1d2df1b9ed2a)
|
| |/
|
|
|
|
|
|
|
|
| |
This reverts commit 6517e8df24d2381e951b9ec3e0cda2ae33edac37.
Commercial SPDX license identifiers need to be removed from
the opensource release.
Change-Id: I60f8c76ace400db6182e012c8aae050d13d262e9
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This can happen if you lookup a script from a type namespace. The type
lookup already has facilities for handling (or rather rejecting) it.
Fixes: QTBUG-123050
Change-Id: I092b1d2f47edc152b4f3967b4eaf4620a81ce5ef
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit 0d1462b3ae8b7cf7975828afc6009d6934c20608)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8f7ee940d7a8ff72a8c3363f422700251a26d2f3)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correctly propagate the isClass and RegisterEnumClassesUnscoped
information from metatypes to qmltypes, then read it correctly, and
don't try to resolve unscoped values of scoped enums when resolving
types. Neither try to resolve the names of unscoped enums.
For historical reasons, enums are unscoped by default, even if they are
declared as "enum class".
Furthermore, QML enums can be accessed in both scoped and unscoped way.
Scoped C++ enums can only be accessed by explicitly stating the scope,
and unscoped C++ enums can only be accessed without scope. Since qmllint
now correctly analyzes this, we need to adapt the tests accordingly.
Finally, also fix the logic around populating the error message for
qmllint. We want to warn about the enum itself, not one of its values.
And we always want to setError() if something is wrong so that the
compilers don't try to continue from there.
Pick-to: 6.2
Fixes: QTBUG-107143
Change-Id: If1ee9a10479cffb46067ccb5e683906905c24160
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7da544e862a92cc0a9d97cbed68a35c532699116)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 806af3541056a580d0c2c6c5d7a518efbc473b68)
(cherry picked from commit 65fa7ff2c98c433843ee25b5a80dc79427aca9f8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "isConstant" tells us that the return value is constant, and we
should generally recognize "false" as well as "true".
Fixes: QTBUG-123413
Change-Id: Ibb5114f6e8c8cb3b45cc2296af6f18cdc5cb1ed1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit d75c816395e23ed0bb89e4e98ea3f809b5262527)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ea76ae03f12496259f2085e3f766f8aab9a412bf)
(cherry picked from commit ecd5b0edf7f3ab4a82fef631ee4b322270183cd8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a warning for QML defined types imported from other modules in
qmltcvisitor to avoid qmltc generating invalid C++ code.
This requires populating the moduleName member of qqmljsscope where it
was ignored:
* for qmldir files imported via command line options
* for inline components
* for the file to be compiled
The module name of the QML file to be compiled is passed
from CMake to qmltc via a newly introduced command line argument, and is
simulated in the tst_qmltc_qprocess tests.
Fixes: QTBUG-121592
Change-Id: I965d759a028546c648ccf6c9aa469b84538be446
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit db7267cd61a5ae094686726ee222e11fef08e977)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fa415aa3722298f3b0d9d0ef40140f61cf06c2e3)
(cherry picked from commit c59880a48749583315dc8bd639abac9d991a3317)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
There can be multiple places that suggest the same fix in a file. We
only want to apply it once.
Fixes: QTBUG-118982
Change-Id: Ie14bf5904c7480074c44f80bb855d28e9b132588
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit 8fce21105d2fb4aa4175da0096177faff1ca246a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit df70b6ca4041b8d980f37538382dddf69ba01b37)
(cherry picked from commit ba0ebf06daae057a54cd5b89fe0b37787b84bd63)
|
| |
|
|
|
|
|
|
|
|
| |
-- Cherry pick: Allow the conversion in the propagator but reject in
generator. This makes qmllint happy for QTBUG-107521.
Fixes: QTBUG-107521
Change-Id: I8b2b0ac74c90b6dcee876e83a64502756733c1c5
(cherry picked from commit fa259ed4ff84a5952cdb6d2c6215e92d65afa56a)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing methods details from qmltypes files, the `isList` value
was ignored. It indicates that the return type of the method is a list
of the type specified in the `type` value.
Add the isList flag to QQmlJSMetaParameter and make the return value a
QQmlJSMetaParameter, too, so that we can pass the flag to the type
resolution.
Fixes: QTBUG-122106
Change-Id: I6ea07c02fbeb6cb07d9fe9184205ff7f3274fd73
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit e303d1282770e1fa1c2439d92f811c09d4e51140)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 411f6cce09c76bd0b6113c60c1c02ae610cd6486)
(cherry picked from commit 7d3204ff061fa636ca73aa459ecf139c17334320)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This produces some overhead, but helps with debugging. Without the
instruction pointer we cannot determine the line numbers for
console.trace().
Fixes: QTBUG-119459
Change-Id: I75a6bb1fcedd8514e2ba46d02dd2904ce222f0e4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 28340bdeb034de8e43ab0eb4c3df9fb4b7c2f478)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 166915d89bacbee6a61b7e21baf2b1221c257c5a)
(cherry picked from commit 40e58e3ff753ad32f3770af1af6e8d2114612b9f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The left-over instructions of QTBUG-109261 were only able to persist
because the dead code analysis assumes that instructions aren't noops
and because the StoreElement instruction was not marked as having side
effects. Since a521216b7149185de9c82b9b6b34486dac8794a1, StoreElement
has been marked as having side effects and the left-over instructions
can thus no longer remain. The dead code elimination logic is thus fine
as it is.
Add an assert in QQmlJSTypePropagator::endInstruction() to prevent noop
instructions in the future.
Fixes: QTBUG-109261
Change-Id: Ida1a121f016c17954ac0005690c100b468378198
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 04c1588965b9a4b12ebf04b23e5336fe88bb4f56)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 06281a668fc2f83f56c498b6f8b893af868cb9f9)
(cherry picked from commit 7f3466d1560c998c81d7a570e9ff47216d5fbf22)
|
| |
|
|
|
|
|
|
|
|
|
| |
Coverity-Id: 435597
Change-Id: I1fe5ef3ef5651d2a8c76d24d381e78d1fe7a1345
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit ebf9e8e314d2ef3d59efd2c1c622313e28fac884)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 347b87bdcee459448fc14a3d8e4b3d0acf4673dc)
(cherry picked from commit cd6e356ab142aefa93d75eeda79e4dcfff32ce72)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you assign undefined to a property that cannot hold undefined an
exception should be generated. We cannot handle this, yet. Therefore we
prohibit such assignments.
Pick-to: 6.2
Change-Id: I0a034032f4522f017b452690d93319eb4bfedb1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit afbf7b699061a38b27c91d3c95890dcc1f92ebe9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ed50111eebec23d81e159026c8896c5d681c1e1e)
(cherry picked from commit 1b0a03639c5bdaddd82b378ce77a21a28e82cbc7)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We cannot assign potential undefined values to resettable properties,
yet.
Pick-to: 6.2
Fixes: QTBUG-120512
Change-Id: I9bca4940256c82bdcf5540b956600eb420be363e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit da6680cb2eeea4c845cffac0a0f9d24e30b1625c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 104c90e883b9a4b0f786f86ec9961654411e42f7)
(cherry picked from commit 49a62c4102533caec989d42208a7e4c99b915e19)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There can be a lot of them and we don't want quadratic behavior. It might be possible to further improve on this using e.g. sorted lists
and algorithms provided by the STL. However, such an implementation
would be more complicated and would require weighing several trade-offs.
Fixes: QTBUG-121139
Change-Id: I717b49bd4af97abcaae9ae78d1e1b31d5d462952
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit af212e5e4edb73978298cd030b15deb8d8c28183)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2108e416eabc68c0136faa5041d80866ce1da716)
(cherry picked from commit 2c460deadc08da2a43da7fc2b96452477c74fafd)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A rename always produces a register with exactly one tracked type, but
we do not want to use it as base for the type adjustments. We want to
adjust based on the original location and its readers (which includes
any renames).
Change-Id: Iaefdf56992c7c101a35a056fb93c49ade5ccf393
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 9f8193b65b0302854068b69bc1c9a46de2eb0a36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9b89a021c3d146576c063928199ba7ba45645512)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have QJSPrimitiveValue for this, and we can still coerce
QJSPrimitiveValue to string if we really need to. However, if you have
overloads of QString and QJSPrimitiveValue for some method, you really
want the QJSPrimitiveValue overload to be called if a number is passed.
Since we can now get more interesting types in StoreNameSloppy, we
actually need to convert them correctly. 6.6 and later already do so
since commit 46cc70e2aafc84db6caeaf747629ee6e825b0a4d.
Pick-to: 6.2
Task-number: QTBUG-111624
Change-Id: Icbc772065ba362994eaa8cb23025ed0bb95eee9b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
(cherry picked from commit 2a998f2b043242df965bb1d21495fd5e299de322)
(cherry picked from commit 19557d27fbbc0e36ac62d2cd2be1de4352259bbf)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some files in tqtc-qtdeclarative were missing the commercial
SPDX-License-Identifier. Build files, examples, tests, or
documentation are not updated.
Task-number: QTQAINFRA-5900
Change-Id: I2cad9a7a271b0b3f3af3074259614b890b266a91
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 132fe2df41fc5e69fec39440b35137d5f0d63f6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We need an additional pair of parentheses here.
Pick-to: 6.2
Fixes: QTBUG-119165
Change-Id: I0d8e810ebb5baad35e2cc1bc5c6581d1ba180dc8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1a8911a13d47ef6a1e903ff414d6a12605cfda30)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e899a765bf6f24705311e88875546af46a9407aa)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
| |
The build files should not include a commercial SPDX-License-Identifier.
Instead, a BSD-3-Clause license identifier is used.
Task-number: QTQAINFRA-5900
Change-Id: I419c4cea2bc0c836811155eddfe3bca2edb22323
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We only read it if the target type is composite. Therefore, check for
composite first, before looking for the accumulator.
Pick-to: 6.2
Fixes: QTBUG-119122
Change-Id: I2a50214f76ee4ffe2f877dc690704e7475b8bd77
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 096f3c3097cb2f60c2f44d4d8c734fc33ffd0a3e)
(cherry picked from commit 23af49f7495a7e2828fbca6e180970877dd47835)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Such code is necessarily dead or uncompilable.
Pick-to: 6.2
Fixes: QTBUG-119090
Change-Id: I7319f7ceeb0b4994d5e974bbe8a9c3ba3bf72fc5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 73f66c8f9409eb2b6e5281dd1fd3fec1b063e2c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3896fb0dc697d2e78c6d3c8b1016af9c884bffed)
|
| |
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-119091
Change-Id: I1e24583aa998976c96bf3ddd6865f33cc4d5e94c
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8190f5bd68ff8acce33b2983e43f9bb5f9abec75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6049b22c97bb1d6ed4eeef97c81c189818ef5c78)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The shadow check may adjust the types later on and cause a different
comparison to happen than what we've expected when propagating. We can
only see this at code generation time.
Pick-to: 6.2
Task-number: QTBUG-117795
Change-Id: I04f1dd9902385f87114e48b0994e0f243f0c2c84
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit 674dc3f73d9d730e87483b86aa9d55186c57cd52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d827bed6b21bba5fb3fdbdf1b9f56064bad6741e)
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Method return values as well as whatever we hide behind "unknown" can
contain shadowable properties. We need to check it.
Pick-to: 6.2
Task-number: QTBUG-117800
Change-Id: I518bc11fd0c9c69340bf621198eeaf4c95d17dae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit 048c8f226ae09b79264e5dfc51f5d8fe7a8332a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 590a47bc0cf557c36503df8ec493d826ae6c878d)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The base type does not have to be the accumulator. The accumulator
doesn't even have to exist, in which case this would crash.
Pick-to: 6.2
Change-Id: I839d0a514fc1b628a829ced96dc3245e4c3eec22
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit aa63c03b914e073df67fc35977062a3c5dcb1c60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6031f2e988a6d304c1b531308b4c08e3c7552e7e)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The next instruction may still need the type conversions even if we
don't need to generate any code for the current instruction.
Amends commit 2c410317b6077fdcfb2cdeb4b730c1b0c544147e.
Fixes: QTBUG-118514
Change-Id: I70ad3691486176de2177e9d5f538f7c99d121bfa
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit c662ae7cbf49bdfc9fd96d34301a86fe96550773)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1d428b22f7ce4ecdff10a040070d619bb9c528f6)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we cannot statically determine the right overload better don't call
any of them for now. Also, allow attempts to pass arguments as derived
types during type propagation.
The test shows that we don't properly pass the thisObject when calling
with metatypes. Fix that, too.
Pick-to: 6.2
Fixes: QTBUG-117922
Change-Id: I02e70ffb9a05f3cfedccafde6e16170b0efbcd29
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 22eaa614ea86c5f823e3de17efa1e43635b52ca7)
(cherry picked from commit 6c8cf863b8fcecdead3b5e4848290995140ab593)
|
| |
|
|
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Fixes: QTBUG-118089
Change-Id: Ib98bb84159847439614341a3cbd4d34d6eabfc8a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 1ba14d58ebdb5def5f48c99a67b9869bd1966ecd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 89a3cca1ee9e3219ffcb65a2cae45172a5558af2)
|
| |
|
|
|
|
|
|
|
|
| |
Updated the commercial SPDX-License-Identifier to
the files in tqtc-qtdeclarative. Examples, tests, or
documentation files were not updated.
Task-number: QTQAINFRA-5900
Change-Id: I74e2ac15b270b503edc80369b126913dd2ec33e1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The extra check for hasOwnProperty() was wrong. It was originally meant
for qmllint to find initial assignments to the same property but qmllint
has a different way of identifying those these days.
Amends commit d2507f238370f6432cd8d65aa7f335dd68484e5a.
Fixes: QTBUG-118100
Change-Id: I6151b8088315b6a99e331b0830b9fdd8188a30cb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 53b9c17749f43a0e94f63871e7fbcc0ccda7a892)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 557db3f1c078554b848d7931946f367c3bc481b0)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Otherwise we get a conversion to unknown and that is bad.
Fixes: QTBUG-117361
Change-Id: Iead1ddd21b692ed9fb9923dccdfa5bd01dc9d467
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Nicolas Fella <nicolas.fella@kdab.com>
(cherry picked from commit d0c7f46b4090010fbb8ebfd6ce200d8bb3dbaadb)
(cherry picked from commit d5ab133e2ee2e9ec781179baefde6404c93885b1)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When searching for a member of a scope, we now first search the starting
scope and its base and extension scopes for QML properties and methods.
Then, if the member has not been found yet, we search for a JS
identifier in the part of the scope hierarchy that are JS scopes.
This change fixes an issue in qmllint where it would warn of functions
not being found when they were, in fact, being called and thus found at
runtime. For example, an object with an invokable function 'print'
would generate a warning that the function could not be found because
it was being confused with the global function print, interupting the
search. The latter was later discarded as a valid result for the search
thus leading to the warning that no function was found.
Fixes: QTBUG-117077
Change-Id: I9899cefe452ed33b7f7f9b3cbceb1f5a5e080269
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 42daf587473aff0789306c92ebc0e7621b57149c)
(cherry picked from commit 0a8390881019cf9845c4cad5bb0ca9a47e25ac54)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
List properties cannot be read-only.
Fixes: QTBUG-114144
Change-Id: Icaf69f581cfb5cdbb75e9b319fcb27b477f241b0
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit dfa51fe0bcc4dafac454791e24e6bb4b919438d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ae018e9a66fa4cab5e5c4ed027b1090488ff7f13)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As far as the type propagator is concerned, it is the the same as
StoreNameSloppy. This allows the unqualified id check to work in strict
functions, too.
Change-Id: Ie4ca823c996e058e4cdde632acaa1caa146b77bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit f9d74e8326b11b39b3bdbcb1ff87a9c8f8bc0d34)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In QQmlJSTypePropagator::generate_StoreName, we would return early in a
few error cases (after calling setError). That is okay for the compiler,
which cares about setError, but qmllint is not interested in compiler
errors by default.
This would result in us not issuing warnings about unqualified id
accesses.
Fix this by also logging the errors via the logger.
Fixes: QTBUG-114467
Change-Id: I10ad10e5c93762b3d9d1fb50d3cabcff2c0b7a4f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 15082891f78d3e6df121fbaef7626be5250bd1e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you pass the enumeration type to the Q_FLAG macro, you'll get an
qmltypes entry where the type is marked as a flag, but where aliasName
is empty. For backwards compatibility reasons, we cannot static_assert
that the type passed into QFlags is actually a flag type.
When using the interpreter, this does not cause any issues, because the
code there does not need to distinguish flags and enums.
When compilation is enabled, we do however generate bogus code, which
either leads to a wrong result, or to a crash if ASAN is enabled.
Avoid the issue by detecting that the enum is missing, and by rejecting
that case.
Fixes: QTBUG-114326
Change-Id: If5cb801b3cf2c3bd7986ef0c8fc3664e6ed564b8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit f7930126a67c59213e88eeb31f275f0b8a5b46a9)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store a copy of the UTF-8 data for file and function so that we don't
run into heap-use-after-free.
Set the instruction pointer before calling the log function so that we
get a correct line number.
Fixes: QTBUG-114655
Change-Id: I38249fe52719ddad620033716ff22b2087ab8382
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit f6735dba9518ffc896541f212fade350e18c91de)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-cherry-pick to 6.5: only the first point was kept. QQmlSA didn't exist
yet in 6.5 and the other change would require changes to the public API.
Here are the sorts of things that were found:
- Uninitialized variables containing garbage.
- Calling member function through nullptr (where this is not actually
used inside the function because that would trigger a segfault).
- static_cast'ing double to int where the double is either +/-infinity
or is outside the range of min and max values for int.
Additionally, the uses of QJSNumberCoercion::isInteger() in the code
generator have been replaced by QJSNumberCoercion::isArrayIndex() and
the former was deprecated as it is no longer being used.
Change-Id: I9318671ccbda37e5519f4fcb84a1537585c2103f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9df4293adf7d019b4d3ccaaa2f5d87ddfe0b041b)
|
| |
|
|
|
|
|
|
|
| |
In the presence of incomplete type information we may otherwise conclude
that the value type is QJSValue and generate broken code.
Change-Id: I533f704a422d0efe8b7b5bb0a170966e9f290b1f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 81bab13560572ffd50153a9cab918063d3305cdd)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Fixes: QTBUG-115159
Change-Id: I659661e58a52ed9ff308c83d6c821cf016f2e94e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit fb4cc245e042d8c1d4c93aea3a68ca9f1fcf4e58)
|
| |
|
|
|
|
|
|
|
| |
Fixes: QTBUG-114897
Change-Id: I23bc913a86ee90764735c1661cd5036f7d177a22
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b7b63ba92c38a66bedb6f0c009bfbf5801f7b701)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
| |
We want to know whether they contain identifiers we are interested in.
Fixes: QTBUG-113855
Change-Id: Icaff280d5babfdd2aae829d5b1b458c3ec76365a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e81cff767568bbb2136f63ebba7a10b1008d77be)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark operations [[nodiscard]] which (directly or indirectly) execute
lazyLoad(). Rationale: we should warn if deferred initialization is
triggered without using the result. Intended uses can still use
casting to void (and hopefully a comment) or [[maybe_unused]] to
indicate the code works as intended.
QUIP: QUIP-0019
Task-number: QTBUG-104168
Change-Id: Iece9b36079c4af8d790b19703f81b284d507bf46
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit bfec2150e24d240c767d7798a761dafaf8236c7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|