summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFredrik Orderud <fredrik.orderud@ge.com>2019-01-29 09:34:34 +0100
committerFredrik Orderud <forderud@gmail.com>2019-01-29 12:43:54 +0000
commit2d030a845ff7ebb9e14443fabfed2bd4c286303d (patch)
treee487c1144ca89a7091839334b68c4839f929954e /tools
parent9a2271e7b2b556888e9f7d73e162fd3269526958 (diff)
Convert testcon project to use QAXFACTORY_BEGIN/END for COM registration
Done to associate the ClassID, InterfaceID & EventsID values more directly against the MainWindow class. The code also becomes more descriptive. Task-number: QTBUG-73056 Change-Id: Ifd2a75aef23190bb19fe229c4e50329ab0dc9651 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/testcon/main.cpp11
-rw-r--r--tools/testcon/mainwindow.h5
2 files changed, 10 insertions, 6 deletions
diff --git a/tools/testcon/main.cpp b/tools/testcon/main.cpp
index c9a5fd9..7c2ca07 100644
--- a/tools/testcon/main.cpp
+++ b/tools/testcon/main.cpp
@@ -35,12 +35,11 @@
#include <QDebug>
#include <QDesktopWidget>
-QAXFACTORY_DEFAULT(MainWindow,
- QLatin1String("{5f5ce700-48a8-47b1-9b06-3b7f79e41d7c}"),
- QLatin1String("{3fc86f5f-8b15-4428-8f6b-482bae91f1ae}"),
- QLatin1String("{02a268cd-24b4-4fd9-88ff-b01b683ef39d}"),
- QLatin1String("{4a43e44d-9d1d-47e5-a1e5-58fe6f7be0a4}"),
- QLatin1String("{16ee5998-77d2-412f-ad91-8596e29f123f}"))
+QAXFACTORY_BEGIN(
+ "{4a43e44d-9d1d-47e5-a1e5-58fe6f7be0a4}", // type library ID
+ "{16ee5998-77d2-412f-ad91-8596e29f123f}") // application ID
+ QAXCLASS(MainWindow)
+QAXFACTORY_END()
QT_USE_NAMESPACE
diff --git a/tools/testcon/mainwindow.h b/tools/testcon/mainwindow.h
index 14dbff4..e980d06 100644
--- a/tools/testcon/mainwindow.h
+++ b/tools/testcon/mainwindow.h
@@ -50,6 +50,11 @@ QT_USE_NAMESPACE
class MainWindow : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{5f5ce700-48a8-47b1-9b06-3b7f79e41d7c}")
+ Q_CLASSINFO("InterfaceID", "{3fc86f5f-8b15-4428-8f6b-482bae91f1ae}")
+ Q_CLASSINFO("EventsID", "{02a268cd-24b4-4fd9-88ff-b01b683ef39d}")
+
public:
MainWindow(QWidget *parent = 0);
~MainWindow();