diff options
author | Fredrik Orderud <forderud@gmail.com> | 2015-09-05 17:15:56 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-15 06:37:46 +0000 |
commit | 6a135e239af4ad38928d5504d6ac176930ff9d68 (patch) | |
tree | 4743f5e4bbebc61f679988c3d8c275b9fc9ab2ca /examples/activeqt/simple/main.cpp | |
parent | 0dd2554101e0ef5d703c89eb671066e56f56c1f4 (diff) |
Convert examples from QAXFACTORY_DEFAULT to Q_CLASSINFO.
Move class ID, interface ID and events ID COM metadata into C++
classes with Q_CLASSINFO for improved readability and
maintainability.
QAXFACTORY_DEFAULT is still documented with an example as part
of the QAxFactory class documentation. Also, it is still used in
the "testcon" ActiveX test container.
Change-Id: I48f5502809081804dc86f1d6b862da281c4cc441
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'examples/activeqt/simple/main.cpp')
-rw-r--r-- | examples/activeqt/simple/main.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/activeqt/simple/main.cpp b/examples/activeqt/simple/main.cpp index 2c86d97..49d7b2a 100644 --- a/examples/activeqt/simple/main.cpp +++ b/examples/activeqt/simple/main.cpp @@ -51,6 +51,9 @@ class QSimpleAX : public QWidget, public QAxBindable { Q_OBJECT + Q_CLASSINFO("ClassID", "{DF16845C-92CD-4AAB-A982-EB9840E74669}") + Q_CLASSINFO("InterfaceID", "{616F620B-91C5-4410-A74E-6B81C76FFFE0}") + Q_CLASSINFO("EventsID", "{E1816BBA-BF5D-4A31-9855-D6BA432055FF}") Q_PROPERTY( QString text READ text WRITE setText ) Q_PROPERTY( int value READ value WRITE setValue ) public: @@ -127,10 +130,9 @@ private: #include "main.moc" //! [1] -QAXFACTORY_DEFAULT(QSimpleAX, - "{DF16845C-92CD-4AAB-A982-EB9840E74669}", - "{616F620B-91C5-4410-A74E-6B81C76FFFE0}", - "{E1816BBA-BF5D-4A31-9855-D6BA432055FF}", - "{EC08F8FC-2754-47AB-8EFE-56A54057F34E}", - "{A095BA0C-224F-4933-A458-2DD7F6B85D8F}") +QAXFACTORY_BEGIN( + "{EC08F8FC-2754-47AB-8EFE-56A54057F34E}", // type library ID + "{A095BA0C-224F-4933-A458-2DD7F6B85D8F}") // application ID + QAXCLASS(QSimpleAX) +QAXFACTORY_END() //! [1] |