diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-30 11:06:57 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-30 11:29:18 (GMT) |
commit | 0d09c6bfa5da53fedc794d6dc99f5675bdf59d49 (patch) | |
tree | 1066531735766690ee8c711ce938d3f9e14f7bf7 /tests/auto/moc/namespaced-flags.h | |
parent | 1d5621a4958ab6f250566c26f891d3e99c6f8585 (diff) | |
download | Qt-0d09c6bfa5da53fedc794d6dc99f5675bdf59d49.zip Qt-0d09c6bfa5da53fedc794d6dc99f5675bdf59d49.tar.gz Qt-0d09c6bfa5da53fedc794d6dc99f5675bdf59d49.tar.bz2 |
Do not recoginze templated types or pointers as flags.
Those types can never by flags.
This fixes QML as they do not use Q_DECLARE_METATYPE in a way visible to moc.
Patch by Aaron Kennedy
Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/moc/namespaced-flags.h')
-rw-r--r-- | tests/auto/moc/namespaced-flags.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/moc/namespaced-flags.h b/tests/auto/moc/namespaced-flags.h index d3f9548..b366447 100644 --- a/tests/auto/moc/namespaced-flags.h +++ b/tests/auto/moc/namespaced-flags.h @@ -62,13 +62,18 @@ namespace Foo { Q_OBJECT //Q_PROPERTY( Bar::Flags flags READ flags WRITE setFlags ) // triggers assertion Q_PROPERTY( Foo::Bar::Flags flags READ flags WRITE setFlags ) // fails to compile, or with the same assertion if moc fix is applied + Q_PROPERTY( QList<Foo::Bar::Flags> flagsList READ flagsList WRITE setFlagsList ) public: explicit Baz( QObject * parent=0 ) : QObject( parent ), mFlags() {} void setFlags( Bar::Flags f ) { mFlags = f; } Bar::Flags flags() const { return mFlags; } + + void setFlagsList( const QList<Bar::Flags> &f ) { mList = f; } + QList<Bar::Flags> flagsList() const { return mList; } private: Bar::Flags mFlags; + QList<Bar::Flags> mList; }; } |