From 6bb3e7f7538d6f5f9296639d2a6ff6a58e30ef91 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 21 May 2015 02:24:34 +0200 Subject: [PATCH] Removed outdated sender check, adjusted time --- src/swiftgui_standard/swiftguistd.cpp | 10 +++------- src/swiftgui_standard/swiftguistd_init.cpp | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/swiftgui_standard/swiftguistd.cpp b/src/swiftgui_standard/swiftguistd.cpp index b18a97c09..5d2df45cc 100644 --- a/src/swiftgui_standard/swiftguistd.cpp +++ b/src/swiftgui_standard/swiftguistd.cpp @@ -295,15 +295,11 @@ void SwiftGuiStd::ps_onConnectionStatusChanged(int from, int to) void SwiftGuiStd::ps_handleTimerBasedUpdates() { - QObject *sender = QObject::sender(); - if (sender == this->m_timerContextWatchdog) - { - this->setContextAvailability(); - this->updateGuiStatusInformation(); - } + this->setContextAvailability(); + this->updateGuiStatusInformation(); // own aircraft - this->ps_reloadOwnAircraft(); // regular updates + this->ps_reloadOwnAircraft(); } void SwiftGuiStd::setContextAvailability() diff --git a/src/swiftgui_standard/swiftguistd_init.cpp b/src/swiftgui_standard/swiftguistd_init.cpp index 48a1a37c1..1ffb76d21 100644 --- a/src/swiftgui_standard/swiftguistd_init.cpp +++ b/src/swiftgui_standard/swiftguistd_init.cpp @@ -105,14 +105,14 @@ void SwiftGuiStd::init(const CRuntimeConfig &runtimeConfig) 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::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->m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::ps_handleTimerBasedUpdates); // log messages m_logSubscriber.changeSubscription(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityInfo)); // start timers, update timers will be started when network is connected - this->m_timerContextWatchdog->start(2 * 1000); + this->m_timerContextWatchdog->start(2500); // init availability this->setContextAvailability();