diff options
author | Ulf Hermann <[email protected]> | 2025-04-11 13:02:07 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2025-04-15 19:27:07 +0200 |
commit | afb51a7e91607a6c99c14d0ae8cd46f8d2954fd2 (patch) | |
tree | 206d99310ab677d79dcaaab50dd67db20a2ed60c /tools/qmltc/main.cpp | |
parent | 373782c1c094c22f0efe03b5d2f726631f9ccf46 (diff) |
qmltc: Cleanly reject custom parsed properties
Process all properties of custom parsed types and generate errors if the
custom parsed properties are actually used. Then print an extra error
stating that qmltc does not support custom parsers.
Pick-to: 6.9 6.8
Fixes: QTBUG-134206
Change-Id: I37e4f3f8d0ee4e0926c0d64c99a4a521b093a1ab
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Diffstat (limited to 'tools/qmltc/main.cpp')
-rw-r--r-- | tools/qmltc/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/qmltc/main.cpp b/tools/qmltc/main.cpp index 3d412182ea..afc9cf95dc 100644 --- a/tools/qmltc/main.cpp +++ b/tools/qmltc/main.cpp @@ -291,8 +291,14 @@ int main(int argc, char **argv) QString(), QString(), QString()); passMan->analyze(QQmlJSScope::createQQmlSAElement(visitor.result())); - if (logger.hasErrors()) + if (logger.hasErrors()) { + if (visitor.hasSeenCustomParsers()) { + logger.log(QStringLiteral("qmltc does not support custom parsers such as ListModel or " + "old forms of Connections and PropertyChanges."), + qmlCompiler, QQmlJS::SourceLocation()); + } return EXIT_FAILURE; + } QList<QQmlJS::DiagnosticMessage> warnings = importer.takeGlobalWarnings(); if (!warnings.isEmpty()) { |