diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-16 02:26:39 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-16 02:52:18 (GMT) |
commit | ce28ad22e2e8d7dadea55f89e9ef93f2528d1098 (patch) | |
tree | 54060b690fd45246138de1dbeacd29f24ff859f1 /tests | |
parent | 62c390d3990bd5c65c9710622198e653e8ac9050 (diff) | |
download | Qt-ce28ad22e2e8d7dadea55f89e9ef93f2528d1098.zip Qt-ce28ad22e2e8d7dadea55f89e9ef93f2528d1098.tar.gz Qt-ce28ad22e2e8d7dadea55f89e9ef93f2528d1098.tar.bz2 |
Revert "Compilation fix on MSVC"
This reverts commit 6d28410756ab29277807d2026b4cbd8e1c707714.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlparser/testtypes.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/auto/declarative/qmlparser/testtypes.h b/tests/auto/declarative/qmlparser/testtypes.h index e124631..ab67a4a 100644 --- a/tests/auto/declarative/qmlparser/testtypes.h +++ b/tests/auto/declarative/qmlparser/testtypes.h @@ -34,6 +34,20 @@ static QVariant myCustomVariantTypeConverter(const QString &data) return QVariant::fromValue(rv); } +class MyAttachedObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(int value READ value WRITE setValue) +public: + MyAttachedObject(QObject *parent) : QObject(parent), m_value(0) {} + + int value() const { return m_value; } + void setValue(int v) { m_value = v; } + +private: + int m_value; +}; + class MyQmlObject : public QObject, public MyInterface, public QmlParserStatus { Q_OBJECT @@ -66,10 +80,8 @@ public: MyInterface *interface() const { return m_interface; } void setInterface(MyInterface *iface) { m_interface = iface; } - static MyQmlObject *qmlAttachedProperties(QObject *other) { - MyQmlObject *rv = new MyQmlObject; - rv->setParent(other); - return rv; + static MyAttachedObject *qmlAttachedProperties(QObject *other) { + return new MyAttachedObject(other); } Q_CLASSINFO("DefaultMethod", "basicSlot()"); |