summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlscriptparser.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-12 23:46:39 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-07-12 23:46:39 (GMT)
commit4ca1f77ab54f1e02045dc7e680bd99103f680fea (patch)
tree3d947d55e6d2c75faf263d555d5237bb73c59582 /src/declarative/qml/qmlscriptparser.cpp
parent5b56189c9a6c322fa595b716a9f17e39a35bcbc0 (diff)
parent66c9d55e58fd9ee9a80270e63a8ebba52db00904 (diff)
downloadQt-4ca1f77ab54f1e02045dc7e680bd99103f680fea.zip
Qt-4ca1f77ab54f1e02045dc7e680bd99103f680fea.tar.gz
Qt-4ca1f77ab54f1e02045dc7e680bd99103f680fea.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/qml/qmlscriptparser.cpp src/declarative/qml/qmlscriptparser_p.h Compiles, but probably next needs a revert/change of module stuff, since that work seems to have been duplicated.
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index cd0a255..cf4691f 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -462,16 +462,26 @@ bool ProcessAST::visit(AST::UiProgram *node)
// UiImport: T_IMPORT T_STRING_LITERAL ;
bool ProcessAST::visit(AST::UiImport *node)
{
- QString fileName = node->fileName->asString();
+ QString uri;
+ QmlScriptParser::Import import;
+
+ if (node->fileName) {
+ import.type = QmlScriptParser::Import::File;
+ uri = node->fileName->asString();
+ } else {
+ import.type = QmlScriptParser::Import::Library;
+ uri = asString(node->importUri);
+ }
AST::SourceLocation startLoc = node->importToken;
AST::SourceLocation endLoc = node->semicolonToken;
- QmlScriptParser::Import import;
+ if (node->importId)
+ import.as = node->importId->asString();
+
import.location = location(startLoc, endLoc);
- import.uri = fileName;
- // XXX not used yet...
- import.prefix = "";
+ import.uri = uri;
+ // XXX not parsed yet...
import.version_major = 0;
import.version_minor = 0;