diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-16 19:07:55 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-19 13:04:15 +0200 |
commit | e824db7f1ea1372b620632d4eac5d048470658d0 (patch) | |
tree | eb7ac190b95b549b6822908ce3908bbd343e7c2b /src/qml/qml/qqmlprivate.h | |
parent | aa6354023a41cc55bcf86b30d5c2bb8e0ecaa453 (diff) |
Don't pre-resolve the QQmlContext for AOT functions
We only ever need it to retrieve the QQmlEngine. However, resolving the
context can involve an allocation.
Change-Id: I064fd528fa7ab9bd37043c5dd1c62d17ea9380e3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlprivate.h')
-rw-r--r-- | src/qml/qml/qqmlprivate.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index 23ba01084d..383337d54c 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE class QQmlPropertyValueInterceptor; -class QQmlContext; +class QQmlContextData; namespace QQmlPrivate { struct CachedQmlUnit; @@ -603,11 +603,13 @@ namespace QQmlPrivate }; struct Q_QML_EXPORT AOTCompiledContext { - QQmlContext *qmlContext; + QQmlContextData *qmlContext; QObject *qmlScopeObject; QJSEngine *engine; QV4::ExecutableCompilationUnit *compilationUnit; + QQmlEngine *qmlEngine() const; + QJSValue jsMetaType(int index) const; void setInstructionPointer(int offset) const; |