Don't underline the import if a qmldump fails,
but the typeinfo is available via a .qmltypes file. That should allow
users to 'fix' qmldump issues by shipping a .qmltypes file.
Reviewed-by: Erik Verbruggen
The problem was that several lookup calls suddenly failed because
the actual QML types were no longer in the default scope chain. However,
the QML documentation says the type names are in the scope.
Also, 'MyComponent.' in a JS-expression context only showed the attached
properties of MyComponent and missed the enums.
With this change completion now may offers too many options, but that's
better than missing some.
This reverts parts of 490f2797f6
Reviewed-by: Leandro Melo
Having a duplicate prototype chain - once in FakeMetaObjects and once
in QmlObjectValues was unnecessary. Now FMOs don't contain references
which may allow other simplifications.
Previously they were leaked when a qmldump or the C++ exported QML
type list updated.
Just deleting the previous FakeMetaObjects is not an option, as they
might still be used in a QmlObjectValue owned by an Engine.
Reviewed-by: Erik Verbruggen
* 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
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