QmlJS: Fix rewriter for signal parameters

Task-number: QTCREATORBUG-7931

I had to fix a bug in the QmlJsParser.
The source location for the
propertyTypeToken was not initialized in all cases.

I also updated qmljs.g.

Change-Id: Idd0880f70578867cf5f97666aede654e00cfc744
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
This commit is contained in:
Thomas Hartmann
2012-10-01 11:43:35 +02:00
parent 366a9316ff
commit 880ab20751
7 changed files with 37 additions and 8 deletions

View File

@@ -544,6 +544,18 @@ protected:
return false;
}
virtual bool visit(UiParameterList *list)
{
for (UiParameterList *it = list; it; it = it->next) {
out(it->propertyTypeToken);
out(" ");
out(it->identifierToken);
if (it->next)
out(", ", it->commaToken);
}
return false;
}
virtual bool visit(UiPublicMember *ast)
{
if (ast->type == UiPublicMember::Property) {
@@ -570,7 +582,11 @@ protected:
} else { // signal
out("signal ");
out(ast->identifierToken);
accept(ast->parameters);
if (ast->parameters) {
out("(");
accept(ast->parameters);
out(")");
}
}
return false;
}