summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclaration.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-17 16:25:35 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-22 09:27:44 +0100
commitd215737df8bbb105c37720a65cb2eae0f3058352 (patch)
treed15e02355130615a3d2e5942530f95da9842f8b9 /src/shared/cplusplus/CheckDeclaration.cpp
parent21fdc2d06af7d8bfbdf7f7a97efb4fa13a55a179 (diff)
downloadqt-creator-d215737df8bbb105c37720a65cb2eae0f3058352.tar.gz
Added semantic checks for Q_PROPERTY declarations.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclaration.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp
index 2eb017b2a1..b58ad1a080 100644
--- a/src/shared/cplusplus/CheckDeclaration.cpp
+++ b/src/shared/cplusplus/CheckDeclaration.cpp
@@ -818,3 +818,17 @@ bool CheckDeclaration::visit(QtFlagsDeclarationAST *ast)
semantic()->check(iter->value, _scope);
return false;
}
+
+bool CheckDeclaration::visit(QtPropertyDeclarationAST *ast)
+{
+ if (ast->type_id)
+ semantic()->check(ast->type_id, _scope);
+ if (ast->property_name)
+ semantic()->check(ast->property_name, _scope);
+ for (QtPropertyDeclarationItemListAST *iter = ast->property_declaration_items;
+ iter; iter = iter->next) {
+ if (iter->value)
+ semantic()->check(iter->value->expression, _scope);
+ }
+ return false;
+}