mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
Connect XSwiftBus signals manually in the proxy
This way we can check the return value and make sure that it is properly connected. ref T291
This commit is contained in:
committed by
Klaus Basan
parent
ef8c7d7d1c
commit
f881b118b6
@@ -24,7 +24,21 @@ namespace BlackSimPlugin
|
||||
CXSwiftBusTrafficProxy::CXSwiftBusTrafficProxy(QDBusConnection &connection, QObject *parent, bool dummy) : QObject(parent)
|
||||
{
|
||||
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XSWIFTBUS_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
|
||||
if (!dummy) { m_dbusInterface->relayParentSignals(); }
|
||||
if (!dummy)
|
||||
{
|
||||
bool s;
|
||||
s = connection.connect(QString(), "/xswiftbus/traffic", "org.swift_project.xswiftbus.traffic",
|
||||
"simFrame", this, SIGNAL(simFrame()));
|
||||
Q_ASSERT(s);
|
||||
|
||||
s = connection.connect(QString(), "/xswiftbus/traffic", "org.swift_project.xswiftbus.traffic",
|
||||
"remoteAircraftAdded", this, SIGNAL(remoteAircraftAdded(QString)));
|
||||
Q_ASSERT(s);
|
||||
|
||||
s = connection.connect(QString(), "/xswiftbus/traffic", "org.swift_project.xswiftbus.traffic",
|
||||
"remoteAircraftAddingFailed", this, SIGNAL(remoteAircraftAddingFailed(QString)));
|
||||
Q_ASSERT(s);
|
||||
}
|
||||
}
|
||||
|
||||
bool CXSwiftBusTrafficProxy::initialize()
|
||||
|
||||
Reference in New Issue
Block a user