aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-04-11 10:17:52 +0200
committerUlf Hermann <ulf.hermann@qt.io>2024-04-12 20:32:59 +0200
commit99c7fe45be00b694da4041c5a06e5484f2985dc6 (patch)
tree9e8a9d6cf436ae5f49a12249cf0ae0b160403ea3 /tests/auto/qml/qqmlecmascript
parent235bbe8c644415a83e3f5103eff7c4ef4181164a (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/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.cpp2
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h4
2 files changed, 3 insertions, 3 deletions
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());