diff options
author | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2012-09-17 14:06:03 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2012-09-17 14:45:56 +0200 |
commit | e5699c09255ec5b85def92bac4f7746bb3f8d3b2 (patch) | |
tree | e1d16c026e47f5eb3dc73e49757d005690e45d47 /src/libs/qmljs/qmljsstaticanalysismessage.cpp | |
parent | 484d4dc26e00b2511ed1f09524803121e2374f60 (diff) | |
download | qt-creator-e5699c09255ec5b85def92bac4f7746bb3f8d3b2.tar.gz |
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>
Diffstat (limited to 'src/libs/qmljs/qmljsstaticanalysismessage.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsstaticanalysismessage.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsstaticanalysismessage.cpp b/src/libs/qmljs/qmljsstaticanalysismessage.cpp index 09c0be604a..18525bbfdb 100644 --- a/src/libs/qmljs/qmljsstaticanalysismessage.cpp +++ b/src/libs/qmljs/qmljsstaticanalysismessage.cpp @@ -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 |