mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +08:00
moved enum metadata registration out of static methods of QObject-derived classes, which fixes #280 (GCC linker errors)
This commit is contained in:
committed by
Klaus Basan
parent
f775ac88d3
commit
e7c14e2c1c
@@ -11,8 +11,13 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
void registerMetadata()
|
void registerMetadata()
|
||||||
{
|
{
|
||||||
IVoice::registerMetadata();
|
// for some reasons (ask RW) these are registered twice
|
||||||
ISimulator::registerMetadata();
|
qRegisterMetaType<ISimulator::Status>();
|
||||||
|
qRegisterMetaType<ISimulator::Status>("Status");
|
||||||
|
qRegisterMetaType<IVoice::ComUnit>();
|
||||||
|
qRegisterMetaType<IVoice::ComUnit>("ComUnit");
|
||||||
|
qRegisterMetaType<IVoice::ConnectionStatus>();
|
||||||
|
qRegisterMetaType<IVoice::ConnectionStatus>("ConnectionStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -9,11 +9,4 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
ISimulator::ISimulator(QObject *parent) : QObject(parent)
|
ISimulator::ISimulator(QObject *parent) : QObject(parent)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void ISimulator::registerMetadata()
|
|
||||||
{
|
|
||||||
// for some reasons (ask RW) this is registered twice, see IVoice
|
|
||||||
qRegisterMetaType<Status>();
|
|
||||||
qRegisterMetaType<Status>("Status");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,10 +49,6 @@ namespace BlackCore
|
|||||||
//! ISimulatorCan we connect?
|
//! ISimulatorCan we connect?
|
||||||
virtual bool canConnect() = 0;
|
virtual bool canConnect() = 0;
|
||||||
|
|
||||||
//! ISimulatorRegister metadata
|
|
||||||
static void registerMetadata();
|
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
//! ISimulatorConnect to simulator
|
//! ISimulatorConnect to simulator
|
||||||
|
|||||||
@@ -9,13 +9,4 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
IVoice::IVoice(QObject *parent) : QObject(parent)
|
IVoice::IVoice(QObject *parent) : QObject(parent)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void IVoice::registerMetadata()
|
|
||||||
{
|
|
||||||
// for some reasons (ask RW) this is registered twice
|
|
||||||
qRegisterMetaType<ComUnit>();
|
|
||||||
qRegisterMetaType<ComUnit>("ComUnit");
|
|
||||||
qRegisterMetaType<ConnectionStatus>();
|
|
||||||
qRegisterMetaType<ConnectionStatus>("ConnectionStatus");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,9 +128,6 @@ namespace BlackCore
|
|||||||
*/
|
*/
|
||||||
virtual QString micTestResultAsString() const = 0;
|
virtual QString micTestResultAsString() const = 0;
|
||||||
|
|
||||||
//! \brief Register metadata
|
|
||||||
static void registerMetadata();
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in New Issue
Block a user