diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-30 00:52:40 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-07-31 01:18:57 (GMT) |
commit | 46ca473d569b92cdfc567c2096b1c4af3ba68f80 (patch) | |
tree | 8473ac40544084f0e6e18876c3605ea2603ef6c8 /tests/auto/qobject | |
parent | 87239ef6438b50b2dfa7b6526a5e5cbe7d5598d5 (diff) | |
download | Qt-46ca473d569b92cdfc567c2096b1c4af3ba68f80.zip Qt-46ca473d569b92cdfc567c2096b1c4af3ba68f80.tar.gz Qt-46ca473d569b92cdfc567c2096b1c4af3ba68f80.tar.bz2 |
Allow retrieval of interface IId from class type.
This method is necessary for QML to support Qt interfaces, but probably
shouldn't be used otherwise.
Reviewed-by: Roberto Raggi
Diffstat (limited to 'tests/auto/qobject')
-rw-r--r-- | tests/auto/qobject/tst_qobject.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index 4f25af6..3df83d7 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -118,6 +118,7 @@ private slots: void connectToSender(); void qobjectConstCast(); void uniqConnection(); + void interfaceIid(); protected: }; @@ -2887,5 +2888,15 @@ void tst_QObject::uniqConnection() delete r2; } +void tst_QObject::interfaceIid() +{ + QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bleh *>()), + QByteArray(Bleh_iid)); + QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bar *>()), + QByteArray("com.qtest.foobar")); + QCOMPARE(QByteArray(qobject_interface_iid<FooObject *>()), + QByteArray()); +} + QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" |