forked from qt-creator/qt-creator
QmlJS: Reactivate instantiating component scope detection.
* Bind::usesQmlPrototype is now significantly more performant * type environments are no longer hashed by filename, but rather by Document * * duplicate scope builds are avoided Task-number: QTCREATORBUG-2835 Reviewed-by: Erik Verbruggen
This commit is contained in:
@@ -1584,14 +1584,14 @@ const TypeEnvironment *Context::typeEnvironment(const QmlJS::Document *doc) cons
|
||||
{
|
||||
if (!doc)
|
||||
return 0;
|
||||
return _typeEnvironments.value(doc->fileName(), 0);
|
||||
return _typeEnvironments.value(doc, 0);
|
||||
}
|
||||
|
||||
void Context::setTypeEnvironment(const QmlJS::Document *doc, const TypeEnvironment *typeEnvironment)
|
||||
{
|
||||
if (!doc)
|
||||
return;
|
||||
_typeEnvironments[doc->fileName()] = typeEnvironment;
|
||||
_typeEnvironments[doc] = typeEnvironment;
|
||||
}
|
||||
|
||||
const Value *Context::lookup(const QString &name, const ObjectValue **foundInScope) const
|
||||
|
Reference in New Issue
Block a user