diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-07 13:11:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-15 06:43:39 +0000 |
commit | 80a024081a8b04bb789a242fc7949af3110105d7 (patch) | |
tree | a31c602eb66489f7a76d17a19416707505d36b8d /src/qml/compiler/qqmltypecompiler_p.h | |
parent | d5bda1e25ea8866851cec109ff630cad44804e53 (diff) |
Clean up implicit component registration
When assigning an object to a property that is a QQmlComponent, we implicitly
"wrap" a Component {} around the object declaration. In the QML IR this is only
half-heartedly represented. In order to correctly determine dependencies later
when saving and to support QML files that use implicit components but don't
import QtQml or QtQuick explicitly, we must also extend the file imports
accordingly. This is now done (and tested) by emulating a "import QtQml 2.0 as
QmlInternals" and then using "QmlInternals.Component".
Change-Id: I26f4f53a35675b52d4bd39f23359b0ac8f9678c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler_p.h')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 1692e05450..93ae7d1fad 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -133,6 +133,8 @@ public: QString bindingAsString(const QmlIR::Object *object, int scriptIndex) const; + void addImport(const QString &module, const QString &qualifier, int majorVersion, int minorVersion); + private: QList<QQmlError> errors; QQmlEnginePrivate *engine; |