Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
6.8
-
None
-
5fc2bfd36 (dev), 31fbe8a19 (dev), 8b61addfa (dev), 603a75608 (dev), 0b94b4ff1 (dev)
Description
Implement warnings in qmlls from QtC's codemodel for .ui.qml files
done to be done in progress won't do waiting for QDS team input
- WarnImperativeCodeNotEditableInVisualDesigner
(warns about assignments to properties whose name is in VisualAspectsPropertyBlackList(), like `x =/ 2` for example)
- WarnUnsupportedTypeInVisualDesigner (list of unsupported types to be adapted by QDS team)
(Warn about types that are not supported in general)
- WarnReferenceToParentItemNotSupportedByVisualDesigner
- WarnUndefinedValueForVisualDesigner (does not seem to be really needed, as qmllint already complains about context properties)
(Warn about values that the code model can't recognize, usually context properties, as QDS does not work properly with them)
- WarnStatesOnlyInRootItemForVisualDesigner (not needed anymore because that is nowadays supported by QDS)
- ErrUnsupportedRootTypeInVisualDesigner (list of unsupported types to be adapted by QDS team, but a first implementation can be already done I think)
(Warn about types that are not supported as .qml.ui root type)
- ErrInvalidIdeInVisualDesigner
(some ids should be at least frowned upon, see IdsThatShouldNotBeUsedInDesigner())
- ErrUnsupportedRootTypeInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnUnsupportedRootTypeInVisualDesigner)
- ErrUnsupportedTypeInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnUnsupportedTypeInVisualDesigner)
- ErrFunctionsNotSupportedInQmlUi
- ErrBlocksNotSupportedInQmlUi
(Complain about "{}"-JS-blocks and "function"-keyword when outside of a `Connections`)
- ErrBehavioursNotSupportedInQmlUi (behaviours are nowadays allowed in QDS and should not be warned about)
- ErrStatesOnlyInRootItemInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnStatesOnlyInRootItemForVisualDesigner)
- ErrReferenceToParentItemNotSupportedInQmlUi (we don't differentiate between QmlUi and VisualDesigner, so its covered by WarnReferenceToParentItemNotSupportedByVisualDesigner)
- WarnDoNotMixTranslationFunctionsInQmlUi (note: implemented in qmllint instead of in the plugin)
Also, you can find all qtc codemodel warnings in qmljsstaticanalysismessage.cpp's StaticAnalysisMessages::StaticAnalysisMessages() and qmljsstaticanalysismessage.h definition of Type enum (each enum value corresponds to a warning, see also their description in the StaticAnalysisMessages::StaticAnalysisMessages() constructor!)
There is also some documentation about the restrictions on https://doc.qt.io/qtcreator/creator-quick-ui-forms.html
Attachments
Issue Links
- is duplicated by
-
QTBUG-126607 qmlls does not complain about limitations of .ui.qml files
- Closed
- is required for
-
QTBUG-119890 qmllint warnings: reach feature parity with QtCreator
- Reported
- relates to
-
QTBUG-129307 qmllint: implement .qml warnings from qmljsstaticanalysismessage.cpp
- Open
- resulted in
-
QTBUG-133349 qqmljslinter: make faster for "synchronous" mode
- In Progress
Gerrit Reviews
For Gerrit Dashboard: QTBUG-129308 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
620348,4 | qdslintplugin: add ImperativeCodeNotEditable warning | dev | qt/qtdeclarative | Status: NEW | +2 | +1 |
620387,2 | qdslintplugin: add ErrUnsupportedTypeInQmlUi | dev | qt/qtdeclarative | Status: NEW | +2 | 0 |
620475,5 | qqmljsscope: add id source location | dev | qt/qtdeclarative | Status: NEW | 0 | +1 |
620476,2 | qdslintplugin: add WarnInvalidIdeInVisualDesigner warning | dev | qt/qtdeclarative | Status: NEW | +2 | 0 |
620494,3 | qdslintplugin: add UnsupportedRootTypeInQmlUi warning | dev | qt/qtdeclarative | Status: NEW | 0 | -1 |
621538,2 | qmllint: Warn about id outside of object declaration | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |
621771,2 | qmllint: don't build tools on cross builds | dev | qt/qtdeclarative | Status: NEW | +2 | 0 |