aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-15 14:47:15 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-15 15:33:10 +0100
commite26f69e92d315479f3c6162915bdba2c50f6deab (patch)
treee728d9be6d10acdc6baa19a389389fa5dfb8ec21 /src
parent6511b17038627ac30cb6622b13c7d46d9877bac5 (diff)
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 <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions_p.h43
1 files changed, 22 insertions, 21 deletions
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)