summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlscriptparser.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-29 10:46:00 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-29 10:46:00 (GMT)
commitd406a899943c6d56d921bc290a009415a3c4eba5 (patch)
treec48f12180910251b4572cb3600a72332ff5f34f5 /src/declarative/qml/qmlscriptparser.cpp
parent696b55195f1ad40a077683dbc533c73baf1536ee (diff)
downloadQt-d406a899943c6d56d921bc290a009415a3c4eba5.zip
Qt-d406a899943c6d56d921bc290a009415a3c4eba5.tar.gz
Qt-d406a899943c6d56d921bc290a009415a3c4eba5.tar.bz2
Support array-literal Script::source values
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index b622c24..23c050c 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -383,10 +383,12 @@ Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId,
QString propertyName = asString(scriptBinding->qualifiedId);
if (propertyName == QLatin1String("source")) {
if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(scriptBinding->statement)) {
- AST::StringLiteral *string = AST::cast<AST::StringLiteral *>(stmt->expression);
- if (string) {
+ QmlParser::Variant string = getVariant(stmt->expression);
+ if (string.isStringList()) {
+ QStringList urls = string.asStringList();
// We need to add this as a resource
- _parser->_refUrls << QUrl(string->value->asString());
+ for (int ii = 0; ii < urls.count(); ++ii)
+ _parser->_refUrls << QUrl(urls.at(ii));
}
}
}