qtdeclarative/tools
Sami Shalayel 4d31fd5799 QQmlJSLinter: add crude context properties warnings
Warn in QQmlJSTypePropagator::generate_LoadQmlContextPropertyLookup()
about usages of context properties that were found. Also treat context
properties as var.
Add the (C++) location of the "setContextProperty()" call to the
warning, and also hint that a property is assumed to be a context
property when inside a top-level component (capital C Component, inline
component or implicitly wrapped as component) because it is not
declared as required property.

Still print the accompanying unqualified warnings next to the new
context property warning.

Add a test.

Later patches will add the support to qmlls and qmllint by passing
the workspace folders to the new functionality.

Task-number: QTBUG-128232
Change-Id: I26e39e0bce8c6e9f203962a091209c7acd15d445
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-05-22 09:19:51 +02:00
..
qml qml-tool: Treat all arguments passed after "--" as positional 2025-04-23 16:00:07 +02:00
qmlaotstats aotstats: Fix coverity warnings 2024-11-07 20:06:01 +01:00
qmlcachegen CMake: Fix installation of qmlcache's .prf files in cross-builds 2025-01-03 11:57:39 +01:00
qmldom DOM refactoring. Remove LoadOptions 2024-01-30 17:14:09 +01:00
qmleasing Remove Qt keywords from all headers 2022-12-09 11:55:10 +08:00
qmlformat qmlformat: move configuration functions into library 2025-01-29 20:37:46 +01:00
qmlimportscanner Port away from QPair 2025-04-12 05:39:59 +00:00
qmljs QtQml: Model native modules as compilation units 2024-12-06 17:39:19 +01:00
qmljsrootgen Tooling: Use QHash/QMap's constFind() to avoid unnecessary detaches 2024-04-23 21:33:39 +03:00
qmllint QQmlJSLinter: add crude context properties warnings 2025-05-22 09:19:51 +02:00
qmlls qmlls: add --version command line parameter 2025-04-23 07:36:04 +01:00
qmlplugindump Port away from QPair 2025-04-12 05:39:59 +00:00
qmlpreview Remove Qt keywords from all headers 2022-12-09 11:55:10 +08:00
qmlprofiler qmlprofiler: Fix data sorting 2024-01-25 18:35:05 +01:00
qmlscene Port to new Q_UNREACHABLE_RETURN() 2022-10-20 23:59:33 +02:00
qmltc qmltc: Cleanly reject custom parsed properties 2025-04-15 19:27:07 +02:00
qmltestrunner Build qmltestrunner with target arch 2025-05-12 08:09:29 +02:00
qmltime Remove all QML_DECLARE_TYPE from src and tools 2023-11-18 07:37:33 +00:00
qmltyperegistrar qmake: Don't pass empty foreign-types list to qmltyperegistrar 2025-02-25 19:46:08 +01:00
svgtoqml Implement item generator via QML generator 2025-04-11 15:50:23 +02:00
CMakeLists.txt Improve builds for non-threaded qt 2025-05-20 15:04:51 +00:00