mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #438 minor tweaks
* removed unused include * status to enum utility function * disconnect signals in network context
This commit is contained in:
@@ -147,6 +147,7 @@ namespace BlackCore
|
||||
|
||||
void CContextNetwork::gracefulShutdown()
|
||||
{
|
||||
this->disconnect(); // all signals
|
||||
if (this->m_vatsimBookingReader) { this->m_vatsimBookingReader->requestStop(); this->m_vatsimBookingReader->quit(); }
|
||||
if (this->m_vatsimDataFileReader) { this->m_vatsimDataFileReader->requestStop(); this->m_vatsimDataFileReader->quit(); }
|
||||
if (this->isConnected()) { this->disconnectFromNetwork(); }
|
||||
|
||||
@@ -45,6 +45,11 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
ISimulator::SimulatorStatus ISimulator::statusToEnum(int status)
|
||||
{
|
||||
return static_cast<SimulatorStatus>(status);
|
||||
}
|
||||
|
||||
void ISimulator::emitSimulatorCombinedStatus(int oldStatus)
|
||||
{
|
||||
int newStatus = getSimulatorStatus();
|
||||
|
||||
@@ -174,6 +174,10 @@ namespace BlackCore
|
||||
//! Status to string
|
||||
static QString statusToString(int status);
|
||||
|
||||
//! Status to enum
|
||||
//! \todo remove with Qt 5.5 when SimulatorStatus can be transferred via DBus
|
||||
static SimulatorStatus statusToEnum(int status);
|
||||
|
||||
signals:
|
||||
//! Simulator combined status
|
||||
//! \todo Qt5.5: Make use of QFlags
|
||||
@@ -256,7 +260,6 @@ namespace BlackCore
|
||||
signals:
|
||||
//! Emitted when the listener discovers the simulator running.
|
||||
void simulatorStarted();
|
||||
|
||||
};
|
||||
|
||||
//! Factory pattern class to create instances of ISimulator
|
||||
@@ -283,7 +286,6 @@ namespace BlackCore
|
||||
virtual ISimulatorListener *createListener(QObject *parent = nullptr) = 0;
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_INTERFACE(BlackCore::ISimulatorFactory, "org.swift-project.blackcore.simulatorinterface")
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmiscfreefunctions.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/simulatedaircraftlist.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfolist.h"
|
||||
@@ -22,7 +21,6 @@ using namespace BlackMisc::Simulation::Fsx;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
using namespace BlackMisc::Simulation::Settings;
|
||||
|
||||
|
||||
/*
|
||||
* Metadata for simulation
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user