diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-10-11 14:21:42 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-18 03:20:24 +0200 |
commit | 910cd60ef998a41434105478fb6df6efc0b94113 (patch) | |
tree | 07c4e134bf8bfdc92d89d56520a63ff2ff5b97d9 /tests/auto/declarative/qdeclarativeecmascript/testtypes.h | |
parent | 277ee9a676cb976b27a7b8667cac1ec0ba1e4ce0 (diff) |
Simplify expression guard logic
Change-Id: I7d191bc8786452c5a1f14d024ff62d223adebd8b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/testtypes.h')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/testtypes.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 5357a63678..7684ddd438 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -1131,6 +1131,23 @@ private: int *m_dtorCount; }; +class WriteCounter : public QObject +{ + Q_OBJECT + Q_PROPERTY(int value READ value WRITE setValue); +public: + WriteCounter() : m_value(0), m_count(0) {} + + int value() const { return m_value; } + void setValue(int v) { m_value = v; ++m_count; } + + int count() const { return m_count; } + +private: + int m_value; + int m_count; +}; + void registerTypes(); #endif // TESTTYPES_H |