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

@@ -219,11 +219,11 @@ void HoverHandler::handleOrdinaryMatch(const LookupContext::Ptr &lookupContext,
void HoverHandler::handleImport(const LookupContext::Ptr &lookupContext, AST::UiImport *node)
{
const Interpreter::TypeEnvironment *typeEnv = lookupContext->context()->typeEnvironment(lookupContext->document().data());
if (!typeEnv)
const Interpreter::Imports *imports = lookupContext->context()->imports(lookupContext->document().data());
if (!imports)
return;
foreach (const Interpreter::TypeEnvironment::Import &import, typeEnv->imports()) {
foreach (const Interpreter::Import &import, imports->all()) {
if (import.info.ast() == node) {
if (import.info.type() == Interpreter::ImportInfo::LibraryImport
&& !import.libraryPath.isEmpty()) {