From e26f69e92d315479f3c6162915bdba2c50f6deab Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 15 Jan 2021 14:47:15 +0100 Subject: Move QtObject out of the QV4 namespace This way we don't have to specially prefix the foreign namespace. Change-Id: I0daa2fe3b8faa205c2c9dfb0f6b1984b2c8e7437 Reviewed-by: Fabian Kosmale Reviewed-by: Andrei Golubev --- src/qml/qml/v8/qqmlbuiltinfunctions_p.h | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h index 4ab982d579..972a0d0b31 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h +++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h @@ -65,23 +65,6 @@ QT_BEGIN_NAMESPACE -namespace QV4 { - -namespace Heap { - -struct ConsoleObject : Object { - void init(); -}; - -#define QQmlBindingFunctionMembers(class, Member) \ - Member(class, Pointer, FunctionObject *, bindingFunction) -DECLARE_HEAP_OBJECT(QQmlBindingFunction, FunctionObject) { - DECLARE_MARKOBJECTS(QQmlBindingFunction) - void init(const QV4::FunctionObject *bindingFunction); -}; - -} - class Q_QML_EXPORT QtObject : public QObject { Q_OBJECT @@ -97,7 +80,7 @@ class Q_QML_EXPORT QtObject : public QObject QML_NAMED_ELEMENT(Qt) QML_SINGLETON - QML_EXTENDED_NAMESPACE(QT_PREPEND_NAMESPACE(Qt)) + QML_EXTENDED_NAMESPACE(Qt) QML_ADDED_IN_VERSION(2, 0) Q_CLASSINFO("QML.StrictArguments", "true") @@ -184,8 +167,9 @@ public: Q_INVOKABLE QJSValue binding(const QJSValue &function) const; // We can't make this invokable as it uses actual varargs - static ReturnedValue method_callLater(const FunctionObject *b, const Value *thisObject, - const Value *argv, int argc); + static QV4::ReturnedValue method_callLater( + const QV4::FunctionObject *b, const QV4::Value *thisObject, + const QV4::Value *argv, int argc); #if QT_CONFIG(translation) QString uiLanguage() const; @@ -202,7 +186,7 @@ public: QJSValue callLater() const; private: - friend struct ExecutionEngine; + friend struct QV4::ExecutionEngine; QtObject(QV4::ExecutionEngine *engine); @@ -217,6 +201,23 @@ private: QJSValue m_callLater; }; +namespace QV4 { + +namespace Heap { + +struct ConsoleObject : Object { + void init(); +}; + +#define QQmlBindingFunctionMembers(class, Member) \ + Member(class, Pointer, FunctionObject *, bindingFunction) +DECLARE_HEAP_OBJECT(QQmlBindingFunction, FunctionObject) { + DECLARE_MARKOBJECTS(QQmlBindingFunction) + void init(const QV4::FunctionObject *bindingFunction); +}; + +} + struct ConsoleObject : Object { V4_OBJECT2(ConsoleObject, Object) -- cgit v1.2.3