forked from qt-creator/qt-creator
QmlJS.Check: Warnings for qml code not supported by Qt Quick Designer
This patch adds several warnings for qml code not supported by Qt Quick
Designer.
* WarnImperativeCodeNotEditableInVisualDesigner:
This warns about imperative code affecting a visual property.
e.g.: "x = 10;"
* WarnUnsupportedTypeInVisualDesigner:
This warns about types which are currently not supported.
* WarnReferenceToParentItemNotSupportedByDesigner:
This warns about things like: "width: parent.width" in
the root item.
* WarnUndefinedValueForDesigner:
This warns about visual properties that cannot be evaluated in
the local context.
e.g.: "x: somethingNotDefinedInTheLocalContext.x"
* WarnStatesOnlyInRootItemForDesigner:
This warns about states not defined in the root item.
All the Qt Quick designer related warnings are disabled by default
in Check.
Change-Id: If31a8199fb95dc8bf6ac613634a2e442e436e267
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
This commit is contained in:
@@ -215,6 +215,17 @@ StaticAnalysisMessages::StaticAnalysisMessages()
|
||||
tr("maximum string value length is %1"), 1);
|
||||
newMsg(ErrInvalidArrayValueLength, Error,
|
||||
tr("%1 elements expected in array value"), 1);
|
||||
newMsg(WarnImperativeCodeNotEditableInVisualDesigner, Warning,
|
||||
tr("Imperative code is not supported in the Qt Quick Designer"));
|
||||
newMsg(WarnUnsupportedTypeInVisualDesigner, Warning,
|
||||
tr("This type is not supported in the Qt Quick Designer"));
|
||||
newMsg(WarnReferenceToParentItemNotSupportedByVisualDesigner, Warning,
|
||||
tr("Reference to parent item cannot be resolved correctly by the Qt Quick Designer"));
|
||||
newMsg(WarnUndefinedValueForVisualDesigner, Warning,
|
||||
tr("This visual property binding cannot be evaluted in the local context "
|
||||
"and might not show up in Qt Quick Designer as expected"));
|
||||
newMsg(WarnStatesOnlyInRootItemForVisualDesigner, Warning,
|
||||
tr("Qt Quick Designer only supports states in the root item "));
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user