mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 19:25:49 +08:00
Removed outdated sender check, adjusted time
This commit is contained in:
@@ -295,15 +295,11 @@ void SwiftGuiStd::ps_onConnectionStatusChanged(int from, int to)
|
|||||||
|
|
||||||
void SwiftGuiStd::ps_handleTimerBasedUpdates()
|
void SwiftGuiStd::ps_handleTimerBasedUpdates()
|
||||||
{
|
{
|
||||||
QObject *sender = QObject::sender();
|
|
||||||
if (sender == this->m_timerContextWatchdog)
|
|
||||||
{
|
|
||||||
this->setContextAvailability();
|
this->setContextAvailability();
|
||||||
this->updateGuiStatusInformation();
|
this->updateGuiStatusInformation();
|
||||||
}
|
|
||||||
|
|
||||||
// own aircraft
|
// own aircraft
|
||||||
this->ps_reloadOwnAircraft(); // regular updates
|
this->ps_reloadOwnAircraft();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::setContextAvailability()
|
void SwiftGuiStd::setContextAvailability()
|
||||||
|
|||||||
@@ -105,14 +105,14 @@ void SwiftGuiStd::init(const CRuntimeConfig &runtimeConfig)
|
|||||||
connect(this->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::ps_onConnectionStatusChanged);
|
connect(this->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::ps_onConnectionStatusChanged);
|
||||||
connect(this->getIContextNetwork(), &IContextNetwork::textMessagesReceived, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived);
|
connect(this->getIContextNetwork(), &IContextNetwork::textMessagesReceived, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived);
|
||||||
connect(this->getIContextNetwork(), &IContextNetwork::textMessageSent, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageSent);
|
connect(this->getIContextNetwork(), &IContextNetwork::textMessageSent, this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageSent);
|
||||||
connect(this->m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::ps_handleTimerBasedUpdates);
|
|
||||||
connect(this->getIContextSettings(), &IContextSettings::changedSettings, this, &SwiftGuiStd::ps_onChangedSetttings);
|
connect(this->getIContextSettings(), &IContextSettings::changedSettings, this, &SwiftGuiStd::ps_onChangedSetttings);
|
||||||
|
connect(this->m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::ps_handleTimerBasedUpdates);
|
||||||
|
|
||||||
// log messages
|
// log messages
|
||||||
m_logSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
|
m_logSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo));
|
||||||
|
|
||||||
// start timers, update timers will be started when network is connected
|
// start timers, update timers will be started when network is connected
|
||||||
this->m_timerContextWatchdog->start(2 * 1000);
|
this->m_timerContextWatchdog->start(2500);
|
||||||
|
|
||||||
// init availability
|
// init availability
|
||||||
this->setContextAvailability();
|
this->setContextAvailability();
|
||||||
|
|||||||
Reference in New Issue
Block a user