The detection of whether a type or one of its children is exported was
broken when we fixed the type information for the QtQuick module.
Reviewed-by: Erik Verbruggen
This is the name that other components will refer to it by. For
instance, MouseArea has a 'drag' property with type 'QDeclarativeDrag',
since QDeclarativeDrag was only exported as Qt.Drag and QtQuick.Drag,
the type lookup didn't manage to resolve the name.
(cherry picked from commit b53ba61248)
When multiple threads share the Bind instance in a Document and do
lookup on the objects contained inside, that may trigger a new object
creation in some situations - which needs to be synchronized.
Link now caches imports. That means importing the same library (say, Qt)
from more than one file no longer creates an importing namespace for
each one. Instead, a single one is created for the instance of Link.
To make this work, the type environment in ScopeChain has been given its
own type: Interpreter::TypeEnvironment. That has the added benefit of
being able to carry meta-information about imports. You can use
TypeEnvironment::importInfo(qmlComponentName) to get information about
the import node that caused the import of the component.
Now that Contexts are cached, it needs to be copyable. However, the
ScopeChain has a QmlComponentChain member that owns resources and didn't
have a correct copy constructor or copy assignment operator.
I've made QmlComponentChain non-copyable and store a shared pointer to
an instance instead, as it will generally not change for a given
context.
Reviewed-by: Lasse Holmstedt
* If possible, create LookupContexts through SemanticInfo; it caches the
linked Context and will be faster.
* Contexts now own their Engine.
Reviewed-by: Lasse Holmstedt
When reading the xml file describing the Qml types, we incorrectly
classified all functions as methods. They should be slots, since
otherwise qmldump couldn't have dumped them in the first place.
Task-number: QTCREATORBUG-1755
Reviewed-by: Erik Verbruggen
Filtering them out has long since become unnecessary. It was used back
when JS files were sourced from Script elements - there they'd only
make the functions available. Now functions and variables are imported.
Task-number: QTCREATORBUG-1735
Reviewed-by: Erik Verbruggen
* Context::build was potentially dangerous. Link and ScopeBuilder
went out of scope before their results stopped being used.
* ScopeBuilder: If no function scope object was found, don't add it.
Reviewed-by: Erik Verbruggen