aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlvaluetypes/testtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlvaluetypes/testtypes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/testtypes.h b/tests/auto/qml/qqmlvaluetypes/testtypes.h
index 798c96e188..78797f06b1 100644
--- a/tests/auto/qml/qqmlvaluetypes/testtypes.h
+++ b/tests/auto/qml/qqmlvaluetypes/testtypes.h
@@ -48,6 +48,8 @@
#include <private/qqmlproperty_p.h>
#include <private/qqmlpropertyvalueinterceptor_p.h>
+Q_DECLARE_METATYPE(QQmlProperty)
+
class MyTypeObject : public QObject
{
Q_OBJECT
@@ -71,6 +73,8 @@ class MyTypeObject : public QObject
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY changed)
Q_PROPERTY(QColor invalidColor READ invalidColor CONSTANT)
Q_PROPERTY(QVariant variant READ variant NOTIFY changed)
+ Q_PROPERTY(QQmlProperty colorProperty READ colorProperty CONSTANT)
+ Q_PROPERTY(QQmlProperty invalidProperty READ invalidProperty CONSTANT)
public:
MyTypeObject() :
@@ -173,6 +177,10 @@ public:
QVariant variant() const { return sizef(); }
+ QQmlProperty colorProperty() { return QQmlProperty(this, "color"); }
+
+ QQmlProperty invalidProperty() const { return QQmlProperty(); }
+
void emitRunScript() { emit runScript(); }
signals: