aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-09 16:07:08 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-16 13:41:05 +0000
commit3aeacf42168339a914cde039c89a5f3d56bab803 (patch)
tree5cba28ec6072b6c9f73e8e05f9ed5edc3f46ac39 /src/qml/qml/qqmlobjectcreator_p.h
parent379342c64db71745edb2bf9a9a100fd1798dbf69 (diff)
Speed up creation of objects without script bindings
Avoid the creation of the QML binding wrappers if we don't need it, by moving the creation into a function that creates it on demand. Change-Id: I1af6a8507a114c1a0b83374704981b7ed4c4a3fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator_p.h')
-rw-r--r--src/qml/qml/qqmlobjectcreator_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h
index 3886155786..fcf247be5a 100644
--- a/src/qml/qml/qqmlobjectcreator_p.h
+++ b/src/qml/qml/qqmlobjectcreator_p.h
@@ -107,6 +107,8 @@ private:
void registerObjectWithContextById(int objectIndex, QObject *instance) const;
+ QV4::Heap::ExecutionContext *currentQmlContext();
+
enum Phase {
Startup,
CreatingObjects,
@@ -117,6 +119,7 @@ private:
} phase;
QQmlEngine *engine;
+ QV4::ExecutionEngine *v4;
QQmlCompiledData *compiledData;
const QV4::CompiledData::Unit *qmlUnit;
QQmlGuardedContextData parentContext;
@@ -139,7 +142,7 @@ private:
QQmlRefPointer<QQmlPropertyCache> _propertyCache;
QQmlVMEMetaObject *_vmeMetaObject;
QQmlListProperty<void> _currentList;
- QV4::ExecutionContext *_qmlContext;
+ QV4::Value *_qmlBindingWrapper;
friend struct QQmlObjectCreatorRecursionWatcher;
};