diff options
| author | Sami Shalayel <sami.shalayel@qt.io> | 2025-07-15 15:29:20 +0200 |
|---|---|---|
| committer | Sami Shalayel <sami.shalayel@qt.io> | 2025-07-31 18:29:53 +0200 |
| commit | 6575b0e835357dbf4f2a04c6df50abee4bda08ba (patch) | |
| tree | 7d873e51609b710a1f772c760e8936f281a413e2 /src/qml/doc/snippets | |
| parent | 87f6e63dfc32e4eac861f3490cb961dfbb028b23 (diff) | |
qmllint: Introduce UserContextProperties
Allow the user to specify context property names in .contextProperties.ini
files so that they can disable all warnings or only the unqualified warning
on their defined context properties by name.
I remember some use cases where checking the .qmllint.ini into a users
project repository is unwanted, so use a new setting file for the
context properties that does not mess with global/system-wide
.qmllint.ini files when checked into the repository.
Create a new class called UserContextPropertiesSettings that is in charge of
loading user context properties setting files, and use it inside of
QQmlJSLinter.
Introduce a ContextPropertyInfo class that contains both the heuristic
information and the user-provided information. ContextPropertyInfo is
used to pass the ContextProperty information down the type propagator.
Also add some documentation for the new settings file.
Task-number: QTBUG-138061
Task-number: QTBUG-128232
Change-Id: Icd700154dc89219f115fa3187c037d65451d0059
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/doc/snippets')
| -rw-r--r-- | src/qml/doc/snippets/qmllint/contextProperties.ini | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/doc/snippets/qmllint/contextProperties.ini b/src/qml/doc/snippets/qmllint/contextProperties.ini new file mode 100644 index 0000000000..703ba57258 --- /dev/null +++ b/src/qml/doc/snippets/qmllint/contextProperties.ini @@ -0,0 +1,4 @@ +[General] +disableUnqualifiedAccess = "myContextProperty1,myContextProperty2" +warnOnUsage = "myContextProperty3,myContextProperty4,myContextProperty5" +disableHeuristic = false |
