forked from qt-creator/qt-creator
QmlJS: Adjust existing code for updated QML parser.
Change-Id: I153723eeb9973be025daf47e317f7b9d076a3c72 Reviewed-on: http://codereview.qt-project.org/4733 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -57,9 +57,9 @@ static QString toString(Statement *statement)
|
||||
if (!expStmt)
|
||||
return QString();
|
||||
if (IdentifierExpression *idExp = cast<IdentifierExpression *>(expStmt->expression)) {
|
||||
return idExp->name->asString();
|
||||
return idExp->name.toString();
|
||||
} else if (StringLiteral *strExp = cast<StringLiteral *>(expStmt->expression)) {
|
||||
return strExp->value->asString();
|
||||
return strExp->value.toString();
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
@@ -75,10 +75,10 @@ static QString getIdProperty(UiObjectDefinition *def)
|
||||
continue;
|
||||
if (script->qualifiedId->next)
|
||||
continue;
|
||||
if (script->qualifiedId->name) {
|
||||
if (script->qualifiedId->name->asString() == QLatin1String("id"))
|
||||
if (!script->qualifiedId->name.isEmpty()) {
|
||||
if (script->qualifiedId->name == QLatin1String("id"))
|
||||
return toString(script->statement);
|
||||
if (script->qualifiedId->name->asString() == QLatin1String("objectName"))
|
||||
if (script->qualifiedId->name == QLatin1String("objectName"))
|
||||
objectName = toString(script->statement);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user