Reworked parts of the QtPropertyDeclaration parsing and handling.

This commit is contained in:
Erik Verbruggen
2010-02-06 11:05:43 +01:00
parent 6ca5f5f5f8
commit 8d8b05da5a
19 changed files with 624 additions and 228 deletions

View File

@@ -498,7 +498,7 @@ bool CheckUndefinedSymbols::visit(ObjCClassDeclarationAST *ast)
bool CheckUndefinedSymbols::visit(ObjCProtocolRefsAST *ast)
{
for (ObjCIdentifierListAST *iter = ast->identifier_list; iter; iter = iter->next) {
for (NameListAST *iter = ast->identifier_list; iter; iter = iter->next) {
if (NameAST *nameAST = iter->value) {
bool resolvedProtocolName = false;

View File

@@ -766,10 +766,11 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
expandBuiltinMacro(identifierToken, spell);
else {
#ifdef ICHECK_BUILD
if(spell != "Q_PROPERTY" && spell != "Q_INVOKABLE" && spell != "Q_ENUMS"
&& spell != "Q_FLAGS" && spell != "Q_DECLARE_FLAGS"){
#endif
if (spell != "Q_PROPERTY" && spell != "Q_INVOKABLE" && spell != "Q_ENUMS"
&& spell != "Q_FLAGS" && spell != "Q_DECLARE_FLAGS") {
// ### FIXME: shouldn't this be T_Q_PROPERTY & friends?
if (Macro *m = env->resolve(spell)) {
if (! m->isFunctionLike()) {
if (0 == (m = processObjectLikeMacro(identifierToken, spell, m)))
@@ -790,9 +791,7 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
}
}
}
#ifdef ICHECK_BUILD
}
#endif
// it's not a function or object-like macro.
out(spell);
}