aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/testtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.h')
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h
index c3733efd3f..9c122a6e92 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.h
+++ b/tests/auto/qml/qqmllanguage/testtypes.h
@@ -1711,6 +1711,54 @@ signals:
void signal(QJSValue value);
};
+struct Large {
+ Q_GADGET
+ QML_VALUE_TYPE(large)
+
+ Q_PROPERTY(uint a MEMBER a)
+ Q_PROPERTY(uint b MEMBER b)
+ Q_PROPERTY(uint c MEMBER c)
+ Q_PROPERTY(uint d MEMBER d)
+ Q_PROPERTY(uint e MEMBER e)
+ Q_PROPERTY(uint f MEMBER f)
+
+public:
+ quint64 a;
+ quint64 b;
+ quint64 c;
+ quint64 d;
+ quint64 e;
+ quint64 f;
+};
+
+inline bool operator==(const Large &a, const Large &b)
+{
+ return a.a == b.a && a.b == b.b && a.c == b.c && a.d == b.d && a.e == b.e && a.f == b.f;
+}
+
+inline bool operator!=(const Large &a, const Large &b) { return !(a == b); }
+
+class Foo: public QObject {
+
+ Q_OBJECT
+ Q_PROPERTY(QVariantList fooProperty READ getList WRITE setList)
+ Q_PROPERTY(Large a MEMBER a BINDABLE aBindable)
+ Q_PROPERTY(Large b MEMBER b BINDABLE bBindable)
+ QML_ELEMENT
+
+public:
+ QVariantList getList() const { return mFooProperty;}
+ void setList(QVariantList list) { mFooProperty = list;}
+
+ QBindable<Large> aBindable() { return QBindable<Large>(&a); }
+ QBindable<Large> bBindable() { return QBindable<Large>(&b); }
+
+private:
+ QProperty<Large> a;
+ QProperty<Large> b;
+ QVariantList mFooProperty;
+};
+
void registerTypes();
#endif // TESTTYPES_H