diff options
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypeproviders/testtypes.h')
-rw-r--r-- | tests/auto/qml/qqmlvaluetypeproviders/testtypes.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h b/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h index 7b308ff338..424995b594 100644 --- a/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h +++ b/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h @@ -34,6 +34,7 @@ public: ConstructibleValueType() = default; Q_INVOKABLE ConstructibleValueType(int foo) : m_foo(foo) {} Q_INVOKABLE ConstructibleValueType(QObject *) : m_foo(67) {} + Q_INVOKABLE ConstructibleValueType(const QUrl &) : m_foo(68) {} int foo() const { return m_foo; } @@ -356,6 +357,20 @@ public: setAVariant(QVariant::fromValue(a)); } + Q_INVOKABLE int acceptConstructibles(const QList<ConstructibleValueType> &constructibles) + { + int result = 0; + for (const auto &c: constructibles) { + result += c.foo(); + } + return result; + } + + Q_INVOKABLE StructuredValueType acceptStructured(const StructuredValueType &a) + { + return a; + } + signals: void changed(); void runScript(); |