diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-04-11 10:17:52 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-04-12 20:32:59 +0200 |
commit | 99c7fe45be00b694da4041c5a06e5484f2985dc6 (patch) | |
tree | 9e8a9d6cf436ae5f49a12249cf0ae0b160403ea3 /tests | |
parent | 235bbe8c644415a83e3f5103eff7c4ef4181164a (diff) |
QtQml: Add a wrapper builtin for QQmlV4Function*
This way qmltyperegistrar can recognize it and refrain from warning
about it.
Task-number: QTBUG-101143
Change-Id: I598140e7e90dbd3e27a78c26eff3d46f0fd3e989
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qv4debugger/commontypes.h | 2 | ||||
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/objectwithmethod.h | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.h | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qml/debugger/qv4debugger/commontypes.h b/tests/auto/qml/debugger/qv4debugger/commontypes.h index ccc3b258ae..b63059b0e6 100644 --- a/tests/auto/qml/debugger/qv4debugger/commontypes.h +++ b/tests/auto/qml/debugger/qv4debugger/commontypes.h @@ -14,7 +14,7 @@ class MyType : public QQuickItem QML_ELEMENT public: MyType(QQuickItem *parent = nullptr) : QQuickItem(parent) {} - Q_INVOKABLE void name(QQmlV4Function*) const {} + Q_INVOKABLE void name(QQmlV4FunctionPtr) const {} }; #endif // COMMONTYPES_H diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 0f47447057..daa16eba72 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -4751,7 +4751,7 @@ public: bool called = false; - Q_INVOKABLE void callMe(QQmlV4Function *) { + Q_INVOKABLE void callMe(QQmlV4FunctionPtr) { called = true; } }; diff --git a/tests/auto/qml/qmlcppcodegen/data/objectwithmethod.h b/tests/auto/qml/qmlcppcodegen/data/objectwithmethod.h index c59a47d2c2..f43a0d5531 100644 --- a/tests/auto/qml/qmlcppcodegen/data/objectwithmethod.h +++ b/tests/auto/qml/qmlcppcodegen/data/objectwithmethod.h @@ -32,7 +32,7 @@ public: // The meta methods are populated back to front. // The V4Function flag should not bleed into the others in either case. - Q_INVOKABLE void overloaded(QQmlV4Function *) { setObjectName(QStringLiteral("javaScript")); } + Q_INVOKABLE void overloaded(QQmlV4FunctionPtr) { setObjectName(QStringLiteral("javaScript")); } Q_INVOKABLE void overloaded(double) { setObjectName(QStringLiteral("double")); } Q_INVOKABLE void overloaded(const QString &) { setObjectName(QStringLiteral("string")); } @@ -41,7 +41,7 @@ public: Q_INVOKABLE void overloaded2(double) { setObjectName(QStringLiteral("double")); } Q_INVOKABLE void overloaded2(const QString &) { setObjectName(QStringLiteral("string")); } - Q_INVOKABLE void overloaded2(QQmlV4Function *) { setObjectName(QStringLiteral("javaScript")); } + Q_INVOKABLE void overloaded2(QQmlV4FunctionPtr) { setObjectName(QStringLiteral("javaScript")); } }; class OverriddenObjectName : public ObjectWithMethod diff --git a/tests/auto/qml/qqmlecmascript/testtypes.cpp b/tests/auto/qml/qqmlecmascript/testtypes.cpp index eb4c4b6c1e..5f7713392b 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.cpp +++ b/tests/auto/qml/qqmlecmascript/testtypes.cpp @@ -106,7 +106,7 @@ public: void setWidth(int) { } }; -void MyQmlObject::v8function(QQmlV4Function *function) +void MyQmlObject::v8function(QQmlV4FunctionPtr function) { function->v4engine()->throwError(QStringLiteral("Exception thrown from within QObject slot")); } diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h index 2df3716113..cc20437fff 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -244,7 +244,7 @@ public slots: void myinvokable(MyQmlObject *o) { myinvokableObject = o; } void variantMethod(const QVariant &v) { m_variant = v; } void qjsvalueMethod(const QJSValue &v) { m_qjsvalue = v; } - void v8function(QQmlV4Function*); + void v8function(QQmlV4FunctionPtr); void registeredFlagMethod(Qt::MouseButtons v) { m_buttons = v; } QString slotWithReturnValue(const QString &arg) { return arg; } int resetCount() { return m_resetCount; } @@ -931,7 +931,7 @@ public: Q_INVOKABLE void method_unknown(NonRegisteredType) { invoke(28); } - Q_INVOKABLE void method_overload2(QQmlV4Function *v) + Q_INVOKABLE void method_overload2(QQmlV4FunctionPtr v) { invoke(31); QV4::Scope scope(v->v4engine()); |