mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
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:
@@ -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)
|
||||
|
||||
@@ -58,6 +58,9 @@ namespace BlackCore
|
||||
//! Gracefully shut down, e.g. for thread safety
|
||||
void gracefulShutdown();
|
||||
|
||||
//! Destructor
|
||||
virtual ~CAirspaceAnalyzer();
|
||||
|
||||
public slots:
|
||||
//! Clear
|
||||
void clear();
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace BlackGui
|
||||
explicit CMappingComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CMappingComponent();
|
||||
virtual ~CMappingComponent();
|
||||
|
||||
//! Number of current mappings
|
||||
int countCurrentMappings() const;
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace BlackGui
|
||||
this->allowStatusBar(false);
|
||||
ui->setupUi(this);
|
||||
this->ps_onStyleSheetsChanged();
|
||||
this->buildNavigator(1);
|
||||
}
|
||||
|
||||
CNavigatorDockWidget::~CNavigatorDockWidget()
|
||||
@@ -143,7 +142,7 @@ namespace BlackGui
|
||||
|
||||
int CNavigatorDockWidget::columnsForRows(int rows)
|
||||
{
|
||||
Q_ASSERT(rows >= 0);
|
||||
Q_ASSERT_X(rows >= 0, Q_FUNC_INFO, "no rows");
|
||||
int items = this->m_widgets.size();
|
||||
int c = items / rows;
|
||||
return (c * rows) < items ? c + 1 : c;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackGui
|
||||
explicit CNavigatorDockWidget(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CNavigatorDockWidget();
|
||||
virtual ~CNavigatorDockWidget();
|
||||
|
||||
//! Add action as navigator item
|
||||
void addAction(QAction * action);
|
||||
|
||||
@@ -2,6 +2,26 @@
|
||||
<ui version="4.0">
|
||||
<class>CNavigatorDockWidget</class>
|
||||
<widget class="QDockWidget" name="CNavigatorDockWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>60</width>
|
||||
<height>38</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="floating">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace BlackMisc
|
||||
static void registerMetadata()
|
||||
{
|
||||
Private::MetaTypeHelper<Derived>::maybeRegisterMetaType();
|
||||
//! \todo KB: What does this monster do? Please some comment
|
||||
// Details: https://dev.vatsim-germany.org/issues/413#note-6
|
||||
[](...){}((qRegisterMetaType<AdditionalTypes>(), qDBusRegisterMetaType<AdditionalTypes>(), 0)...);
|
||||
}
|
||||
|
||||
|
||||
@@ -478,6 +478,9 @@
|
||||
<property name="text">
|
||||
<string>Navigator</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+W, Ctrl+N</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_NavigatorHorizontal">
|
||||
<property name="text">
|
||||
|
||||
Reference in New Issue
Block a user