forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user