Add CLASSINFO() to enumerate supported interfaces.

This commit is contained in:
Gerhard Hoffmann 2023-11-17 13:44:16 +01:00
parent 2efdbe2d68
commit 88670c1079
3 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,7 @@ class ATBVMCPlugin : public VMCInterface {
Q_OBJECT
Q_INTERFACES(VMCInterface)
Q_CLASSINFO("Interface", "VMCInterface")
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "eu.atb.ptu.plugin.ATBVMCPlugin")
@ -42,6 +43,8 @@ public:
// helpers e.g. for debug / log
virtual QString const &getString(RESULT_STATE resultState) override;
QStringList interfaces() const;
public slots:
virtual void onChangedProgramModeToSELL() override;
virtual void onChangedProgramModeToSERVICE() override;

View File

@ -14,6 +14,7 @@
class UnifiedDCVMCInterface : public ATBAPPplugin {
Q_INTERFACES(ATBAPPplugin)
Q_CLASSINFO("Interface", "ATBAPPplugin")
public:
explicit UnifiedDCVMCInterface() = default;

View File

@ -21,7 +21,8 @@ class VMCInterface : public QObject, public UnifiedDCVMCInterface {
Q_OBJECT
Q_INTERFACES(ATBAPPplugin UnifiedDCVMCInterface)
Q_CLASSINFO("Interface", "ATBAPPplugin")
Q_CLASSINFO("Interface", "UnifiedDCVMCInterface")
public:
explicit VMCInterface(QObject *parent = nullptr) : QObject(parent) {}