aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-06-04 16:35:00 +0200
committerLars Knoll <lars.knoll@digia.com>2013-06-05 10:55:08 +0200
commitf0e32d311a791910acef672b1ab9a2ac4a80171e (patch)
treeb4af025e391eb84e8a5ec7e6ec550e35aeac5488 /src/qml/qml/qqmlengine_p.h
parentc0a79111f7c08b482338df05e047da1ddbf95c9b (diff)
Move QV8QObjectWrapper::newQObject into QV4::QObjectWrapper
...where it is just called wrap(), because it doesn't always create a new JS wrapper for the QObject. Change-Id: Ieed0fc97174eb51cd04df0149e715c234a5822bd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r--src/qml/qml/qqmlengine_p.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h
index 39927c7aa0..62e4ee9e5d 100644
--- a/src/qml/qml/qqmlengine_p.h
+++ b/src/qml/qml/qqmlengine_p.h
@@ -152,6 +152,7 @@ public:
int inProgressCreations;
QV8Engine *v8engine() const { return q_func()->handle(); }
+ QV4::ExecutionEngine *v4engine() const { return QV8Engine::getV4(q_func()->handle()); }
QQuickWorkerScriptEngine *getWorkerScriptEngine();
QQuickWorkerScriptEngine *workerScriptEngine;
@@ -239,6 +240,7 @@ public:
static void warning(QQmlEnginePrivate *, const QList<QQmlError> &);
inline static QV8Engine *getV8Engine(QQmlEngine *e);
+ inline static QV4::ExecutionEngine *getV4Engine(QQmlEngine *e);
inline static QQmlEnginePrivate *get(QQmlEngine *e);
inline static const QQmlEnginePrivate *get(const QQmlEngine *e);
inline static QQmlEnginePrivate *get(QQmlContext *c);
@@ -465,7 +467,14 @@ QV8Engine *QQmlEnginePrivate::getV8Engine(QQmlEngine *e)
{
Q_ASSERT(e);
- return e->d_func()->v8engine();
+ return e->d_func()->v8engine();
+}
+
+QV4::ExecutionEngine *QQmlEnginePrivate::getV4Engine(QQmlEngine *e)
+{
+ Q_ASSERT(e);
+
+ return e->d_func()->v4engine();
}
QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlEngine *e)