aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-10-22 05:24:20 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-11-26 09:17:36 +0000
commit8bf579d8d4feb13ca8651e98dd762b28483abe9e (patch)
tree7d779292848d742b427bc35a1723b1049e60ee99 /src
parent9fdab4a3619f457f66716c74ea73355453557e52 (diff)
Cleanup of builtin JS helpers for qmljs
Replace the hand-written gc and print functions with the print and gc functions also used in Qml and QJSEngine. And while we're at it, this also adds the console object. Change-Id: Ia3a0ff24936b7ed5149cb689838b987f9178131e Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h2
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions_p.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index a46066bde4..25d6fc1970 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -147,7 +147,7 @@ public:
QQmlEngine *qmlEngine() const;
#else // !V4_BOOTSTRAP
QJSEngine *jsEngine() const { return v8Engine->publicEngine(); }
- QQmlEngine *qmlEngine() const { return v8Engine->engine(); }
+ QQmlEngine *qmlEngine() const { return v8Engine ? v8Engine->engine() : nullptr; }
#endif // V4_BOOTSTRAP
QV8Engine *v8Engine;
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
index 7602a92582..f428e377d7 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
@@ -166,7 +166,7 @@ struct ConsoleObject : Object
};
-struct GlobalExtensions {
+struct Q_QML_PRIVATE_EXPORT GlobalExtensions {
static void init(Object *globalObject, QJSEngine::Extensions extensions);
#ifndef QT_NO_TRANSLATION