diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2025-04-11 13:02:07 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2025-04-15 19:27:07 +0200 |
| commit | afb51a7e91607a6c99c14d0ae8cd46f8d2954fd2 (patch) | |
| tree | 206d99310ab677d79dcaaab50dd67db20a2ed60c /src/qmlcompiler/qqmljsimportvisitor_p.h | |
| 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 <sami.shalayel@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsimportvisitor_p.h')
| -rw-r--r-- | src/qmlcompiler/qqmljsimportvisitor_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljsimportvisitor_p.h b/src/qmlcompiler/qqmljsimportvisitor_p.h index abaca7a691..c56f6a9f99 100644 --- a/src/qmlcompiler/qqmljsimportvisitor_p.h +++ b/src/qmlcompiler/qqmljsimportvisitor_p.h @@ -159,6 +159,8 @@ protected: void throwRecursionDepthError() override; + virtual bool checkCustomParser(const QQmlJSScope::ConstPtr &scope); + QString m_implicitImportDirectory; QStringList m_qmldirFiles; QQmlJSScope::Ptr m_currentScope; @@ -266,7 +268,7 @@ protected: template<typename ErrorHandler> bool checkTypeResolved(const QQmlJSScope::ConstPtr &type, ErrorHandler handle) { - if (type->isFullyResolved() || type->isInCustomParserParent()) + if (type->isFullyResolved() || checkCustomParser(type)) return true; // Note: ignore duplicates, but only after we are certain that the type |
