mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Delay setting the DBusConnection for a DBusObject
Previously, the DBusconnection had to be set at construction time and could not be changed over the DBusObject life time. Now a new connection can be set anytime and as often as required. The shared ownership is now also properly implemented by shared pointers. ref T291
This commit is contained in:
committed by
Klaus Basan
parent
01085f24b3
commit
59da68da5e
@@ -43,12 +43,11 @@ namespace XSwiftBus
|
||||
surfaces.lights.timeOffset = static_cast<uint16_t>(std::rand() % 0xffff);
|
||||
}
|
||||
|
||||
CTraffic::CTraffic(CDBusConnection *dbusConnection) :
|
||||
CDBusObject(dbusConnection),
|
||||
CTraffic::CTraffic() :
|
||||
CDBusObject(),
|
||||
m_followPlaneViewNextCommand("org/swift-project/xswiftbus/follow_next_plane", "Changes plane view to follow next plane in sequence", [this] { followNextPlane(); }),
|
||||
m_followPlaneViewPreviousCommand("org/swift-project/xswiftbus/follow_previous_plane", "Changes plane view to follow previous plane in sequence", [this] { followPreviousPlane(); })
|
||||
{
|
||||
registerDBusObjectPath(XSWIFTBUS_TRAFFIC_INTERFACENAME, XSWIFTBUS_TRAFFIC_OBJECTPATH);
|
||||
XPLMRegisterDrawCallback(drawCallback, xplm_Phase_Airplanes, 1, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user