Return QStringList from getPluginInfo().
This commit is contained in:
parent
94b51b5794
commit
1a08f8ee3a
@ -5,7 +5,7 @@
|
||||
* a simple class with only one method for plugin info
|
||||
*/
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
class ATBAPPplugin
|
||||
{
|
||||
@ -14,7 +14,7 @@ public:
|
||||
explicit ATBAPPplugin() = default;
|
||||
virtual ~ATBAPPplugin() = default;
|
||||
|
||||
virtual const QString & getPluginInfo() = 0;
|
||||
virtual QStringList getPluginInfo() = 0;
|
||||
};
|
||||
|
||||
Q_DECLARE_INTERFACE(ATBAPPplugin,
|
||||
|
@ -17,21 +17,18 @@ ATBVMCPlugin::ATBVMCPlugin(QObject *parent)
|
||||
: VMCInterface(parent)
|
||||
, m_errorCode("")
|
||||
, m_errorDescription("")
|
||||
, m_pluginInfo("")
|
||||
, m_serialPortName("")
|
||||
, m_useDebug(false)
|
||||
, m_pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
||||
, m_vmc(nullptr) {
|
||||
|
||||
QStringList lst;
|
||||
lst << QString(" Interface: ") + INTERFACE;
|
||||
lst << QString("Interface Version: ") + INTERFACE_VERSION;
|
||||
lst << QString(" PluginName: ") + PLUGIN_NAME;
|
||||
lst << QString(" Version: ") + PLUGIN_VERSION;
|
||||
lst << QString(" git-describe: ") + PLUGIN_GIT_DESCRIBE;
|
||||
lst << QString(" Extended version: ") + PLUGIN_EXTENDED_VERSION;
|
||||
|
||||
m_pluginInfo = lst.join('\n');
|
||||
m_pluginInfo.clear();
|
||||
m_pluginInfo << QString(" Interface: ") + INTERFACE;
|
||||
m_pluginInfo << QString("Interface Version: ") + INTERFACE_VERSION;
|
||||
m_pluginInfo << QString(" PluginName: ") + PLUGIN_NAME;
|
||||
m_pluginInfo << QString(" Version: ") + PLUGIN_VERSION;
|
||||
m_pluginInfo << QString(" git-describe: ") + PLUGIN_GIT_DESCRIBE;
|
||||
m_pluginInfo << QString(" Extended version: ") + PLUGIN_EXTENDED_VERSION;
|
||||
}
|
||||
|
||||
ATBVMCPlugin::~ATBVMCPlugin() {
|
||||
@ -41,7 +38,7 @@ ATBVMCPlugin::~ATBVMCPlugin() {
|
||||
}
|
||||
}
|
||||
|
||||
QString const &ATBVMCPlugin::getPluginInfo() {
|
||||
QStringList ATBVMCPlugin::getPluginInfo() {
|
||||
return m_pluginInfo;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
explicit ATBVMCPlugin(QObject *parent = nullptr);
|
||||
virtual ~ATBVMCPlugin();
|
||||
|
||||
virtual const QString & getPluginInfo() override;
|
||||
virtual QStringList getPluginInfo() override;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// interface:
|
||||
@ -59,7 +59,7 @@ public slots:
|
||||
private:
|
||||
QString m_errorCode;
|
||||
QString m_errorDescription;
|
||||
QString m_pluginInfo;
|
||||
QStringList m_pluginInfo;
|
||||
QString m_serialPortName;
|
||||
bool m_useDebug;
|
||||
PLUGIN_STATE m_pluginState;
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
explicit UnifiedDCVMCInterface() = default;
|
||||
virtual ~UnifiedDCVMCInterface() = default;
|
||||
|
||||
virtual const QString & getPluginInfo() = 0;
|
||||
virtual QStringList getPluginInfo() = 0;
|
||||
|
||||
// mandantory ATBAPP plugin methods:
|
||||
virtual PLUGIN_STATE getState() = 0;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
explicit VMCInterface(QObject *parent = nullptr) : QObject(parent) {}
|
||||
virtual ~VMCInterface() = default;
|
||||
|
||||
virtual const QString & getPluginInfo() = 0;
|
||||
virtual QStringList getPluginInfo() = 0;
|
||||
|
||||
virtual PLUGIN_STATE initPlugin(QObject *eventReceiver, QObject *atbSystem,
|
||||
QObject *hmiConfig, QSettings const &settings) override {
|
||||
|
Loading…
Reference in New Issue
Block a user