diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-02 13:22:14 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-02 13:22:29 (GMT) |
commit | 25023911295c201758faaa2c800b2388ddf1e0b0 (patch) | |
tree | 74cbd3766b1207a00d1bd48dd3a5798307a540c9 /tests/auto/moc/tst_moc.cpp | |
parent | d16ba0a93d611689bce9a2732a1cc8c9a317f5bf (diff) | |
parent | fb01592ef98dbaa4d0591df77cffaaf0ea0e117a (diff) | |
download | Qt-25023911295c201758faaa2c800b2388ddf1e0b0.zip Qt-25023911295c201758faaa2c800b2388ddf1e0b0.tar.gz Qt-25023911295c201758faaa2c800b2388ddf1e0b0.tar.bz2 |
Merge commit 'oslo-staging-2/4.6' into upstream/4.6
Diffstat (limited to 'tests/auto/moc/tst_moc.cpp')
-rw-r--r-- | tests/auto/moc/tst_moc.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index 69d6ca7..2316ba2 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -489,7 +489,6 @@ private slots: void constructors(); void typenameWithUnsigned(); void warnOnVirtualSignal(); - signals: void sigWithUnsignedArg(unsigned foo); void sigWithSignedArg(signed foo); @@ -817,6 +816,8 @@ void tst_Moc::structQObject() #include "namespaced-flags.h" +Q_DECLARE_METATYPE(QList<Foo::Bar::Flags>); + void tst_Moc::namespacedFlags() { Foo::Baz baz; @@ -829,6 +830,12 @@ void tst_Moc::namespacedFlags() QVERIFY(v.isValid()); QVERIFY(baz.setProperty("flags", v)); QVERIFY(baz.flags() == bar.flags()); + + QList<Foo::Bar::Flags> l; + l << baz.flags(); + QVariant v2 = baz.setProperty("flagsList", QVariant::fromValue(l)); + QCOMPARE(l, baz.flagsList()); + QCOMPARE(l, qvariant_cast<QList<Foo::Bar::Flags> >(baz.property("flagsList"))); } void tst_Moc::warnOnMultipleInheritance() |