QmlJS: Separate imported types and imported JS scopes.

Task-number: QTCREATORBUG-4981
Change-Id: I06d3e428ca4928296a3d5977aeff29fc3217c37c
Reviewed-on: http://codereview.qt.nokia.com/175
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-05-27 10:43:06 +02:00
parent ca1eaca136
commit a7f4e5fab5
7 changed files with 194 additions and 92 deletions

View File

@@ -127,8 +127,9 @@ void ScopeBuilder::initializeRootScope()
componentScopes.insert(_doc.data(), chain);
makeComponentChain(_doc, snapshot, chain, &componentScopes);
if (const TypeEnvironment *typeEnvironment = _context->typeEnvironment(_doc.data())) {
scopeChain.qmlTypes = typeEnvironment;
if (const Imports *imports = _context->imports(_doc.data())) {
scopeChain.qmlTypes = imports->typeScope();
scopeChain.jsImports = imports->jsImportScope();
}
} else {
// add scope chains for all components that import this file