aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi/qjsengine.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-12-19 11:14:27 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-02-02 09:37:40 +0000
commit65606ea1559572d66ee8bfac77e87f3e8f447c3e (patch)
treeac129f9b750303c553bcf2021798ccdb9c24c48c /src/qml/jsapi/qjsengine.h
parent4939f4dd65ea28268656682ffa1378a9697fe5ac (diff)
Remove double indirection between QJSEngine and QV4::ExecutionEngine
As QJSEngine's handle() method is internal, we can redefine it to return a pointer to an ExecutionEngine. That makes many things easier. Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsapi/qjsengine.h')
-rw-r--r--src/qml/jsapi/qjsengine.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h
index 913757107f..89642b6f20 100644
--- a/src/qml/jsapi/qjsengine.h
+++ b/src/qml/jsapi/qjsengine.h
@@ -52,8 +52,6 @@
QT_BEGIN_NAMESPACE
-class QV8Engine;
-
template <typename T>
inline T qjsvalue_cast(const QJSValue &);
@@ -111,7 +109,7 @@ public:
void installExtensions(Extensions extensions, const QJSValue &object = QJSValue());
- QV8Engine *handle() const { return d; }
+ QV4::ExecutionEngine *handle() const { return m_v4Engine; }
private:
QJSValue create(int type, const void *ptr);
@@ -124,10 +122,9 @@ protected:
QJSEngine(QJSEnginePrivate &dd, QObject *parent = nullptr);
private:
- QV8Engine *d;
+ QV4::ExecutionEngine *m_v4Engine;
Q_DISABLE_COPY(QJSEngine)
Q_DECLARE_PRIVATE(QJSEngine)
- friend class QV8Engine;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QJSEngine::Extensions)