Fixes / improvements found during testing

* Redundant "simulatorStatusChanged" signal in proxy
* invokeMethod for timer
* removed redundant this->buildNavigator(1)
* Shortcut in GUI
* comment in variant
This commit is contained in:
Klaus Basan
2015-05-16 01:19:40 +02:00
parent 405de80945
commit c380b8df23
9 changed files with 39 additions and 11 deletions

View File

@@ -73,7 +73,14 @@ namespace BlackCore
void CAirspaceAnalyzer::gracefulShutdown()
{
this->m_timer.stop();
bool s = QMetaObject::invokeMethod(&m_timer, "stop");
Q_ASSERT_X(s, Q_FUNC_INFO, "invoke failed");
Q_UNUSED(s);
}
CAirspaceAnalyzer::~CAirspaceAnalyzer()
{
gracefulShutdown();
}
void CAirspaceAnalyzer::ps_watchdogTouchAircraftCallsign(const CAircraftSituation &situation, const CTransponder &transponder)

View File

@@ -58,6 +58,9 @@ namespace BlackCore
//! Gracefully shut down, e.g. for thread safety
void gracefulShutdown();
//! Destructor
virtual ~CAirspaceAnalyzer();
public slots:
//! Clear
void clear();

View File

@@ -18,7 +18,6 @@ using namespace BlackMisc::Aviation;
using namespace BlackMisc::Network;
using namespace BlackMisc::Geo;
using namespace BlackMisc::Simulation;
using namespace BlackMisc::Simulation;
namespace BlackCore
{
@@ -36,9 +35,6 @@ namespace BlackCore
bool s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"simulatorStatusChanged", this, SIGNAL(simulatorStatusChanged(int)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"simulatorStatusChanged", this, SIGNAL(simulatorStatusChanged(int)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"installedAircraftModelsChanged", this, SIGNAL(installedAircraftModelsChanged()));
Q_ASSERT(s);
@@ -52,7 +48,7 @@ namespace BlackCore
"renderRestrictionsChanged", this, SIGNAL(renderRestrictionsChanged(bool, int, BlackMisc::PhysicalQuantities::CLength, BlackMisc::PhysicalQuantities::CLength)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"simulatorPluginChanged", this, SIGNAL(simulatorPluginChanged(BlackMisc::Simulation::CSimulatorPluginInfo &)));
"simulatorPluginChanged", this, SIGNAL(simulatorPluginChanged(BlackMisc::Simulation::CSimulatorPluginInfo)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"airspaceSnapshotHandled", this, SIGNAL(airspaceSnapshotHandled()));