forked from qt-creator/qt-creator
QmlJS: Improve handling of user defined enums
Improves handling of Qml based enums inside qml documents. * completion of enums * follow the enum * highlighting values inside the declaration * displaying the enum declaration inside the outline * minor static checks Task-number: QTCREATORBUG-19226 Change-Id: Ia07fd9a8b7fa3106f2ea53198bfdcc50eecb7307 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -348,6 +348,13 @@ protected:
|
||||
return visit(static_cast<FunctionExpression *>(ast));
|
||||
}
|
||||
|
||||
bool visit(UiEnumMemberList *ast) override
|
||||
{
|
||||
for (auto it = ast; it; it = it->next)
|
||||
addUse(it->memberToken, SemanticHighlighter::FieldType);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool visit(PatternElement *ast) override
|
||||
{
|
||||
if (ast->isVariableDeclaration())
|
||||
|
||||
Reference in New Issue
Block a user