aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/objectwithmethod.h
Commit message (Collapse)AuthorAgeFilesLines
* tst_qmlcppcodegen: Compile test with QT_NO_CAST_FROM_ASCIIOlivier De Cannière2024-10-091-2/+2
| | | | | | | | This should help find raw string literals in generated code Task-number: QTBUG-129797 Change-Id: I66e5d6302319678b494030e8cb3459eb06f0f134 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* QtQml: Add a wrapper builtin for QQmlV4Function*Ulf Hermann2024-04-121-2/+2
| | | | | | | | | This way qmltyperegistrar can recognize it and refrain from warning about it. Task-number: QTBUG-101143 Change-Id: I598140e7e90dbd3e27a78c26eff3d46f0fd3e989 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlPropertyCache: Correctly set flags when loading methodsUlf Hermann2024-02-291-0/+7
| | | | | | | | | | | | We commonly load multiple methods in sequence into the same QQmlPropertyData. We need to set all the relevant flags for each one. Otherwise the wrong flags are transferred to subsequent methods. Pick-to: 6.7 6.6 6.5 Task-number: QTBUG-112366 Change-Id: I7432500b9149fdd8dd2dd98eb923ada70232fb6d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Correct license for test filesLucie Gérard2024-02-271-1/+1
| | | | | | | | | | | | | | According to QUIP-18 [1], all test files should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Reject calls to one of multiple fuzzy overloadsUlf Hermann2023-10-231-0/+3
| | | | | | | | | | | | | | | 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.6 6.5 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>
* QmlCompiler: Correctly handle lookups in results of method callsUlf Hermann2023-07-251-0/+36
| | | | | | | | | | | | | | | | | 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 46cc70e2aafc84db6caeaf747629ee6e825b0a4d. Pick-to: 6.6 Fixes: QTBUG-115278 Change-Id: I24dcd06161eb1af44450fb663d68a16d89efd6ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Improve method overload selectionUlf Hermann2023-03-021-0/+5
| | | | | | | | If we have an exact match we should definitely use that. Change-Id: I2846ecf6f9963a978b84b70fbe18acdfe6eb45e6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-27/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace uses of deprecated _qs with _s/QStringLiteralSona Kurazyan2022-04-291-2/+2
| | | | | | Task-number: QTBUG-101408 Change-Id: Ic925751b73f52d8fa5add5cacc52d6dd6ea2dc27 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Fix licenses in test filesUlf Hermann2022-04-281-6/+13
| | | | | | | Those are not commercial-only anymore. Change-Id: I4ebb6fa4b8295b9e5cbb901ab39e30df6e0c85ce Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Compile QML files ahead of time with qmlcachegenUlf Hermann2021-12-031-0/+77
qmlcachegen compiles bindings and functions to C++ as far as QQmlJSAotCompiler can. It does respect "pragma Strict" and rejects the file if it's violated. Furthermore, it sets up the logger to follow the qt.qml.compiler.aot logging category. By default it's completely silent. Compiling the examples with qmlcachegen exposes a bug in the type resolver where it returns an invalid generic type. It should never do that. Fix it by returning JSValue. [ChangeLog][QtQml][Important Behavior Changes] QML bindings and functions are now compiled to C++ by qmlcachegen, if possible. Use the qt.qml.compiler.aot logging category to receive diagnostics about the compilation. Task-number: QTBUG-98305 Change-Id: I6953812c3fd20b68339617a5714fcbe16a384360 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>