Finetuning

* Improved reloading of booked stations
* Improved error reporting in data file reader
* Finetuning of network context, mostly reg. VATSIM data file
This commit is contained in:
Klaus Basan
2014-06-09 02:47:32 +02:00
parent 1b83197691
commit 2325881c91
5 changed files with 46 additions and 22 deletions

View File

@@ -71,13 +71,22 @@ namespace BlackGui
Q_ASSERT(this->ui->tvp_AtcStationsBooked);
Q_ASSERT(this->getIContextNetwork());
this->ui->tvp_AtcStationsBooked->update(this->getIContextNetwork()->getAtcStationsBooked());
this->m_timestampLastReadBookedStations = QDateTime::currentDateTimeUtc();
QObject *sender = QObject::sender();
if (sender == this->ui->pb_ReloadAtcStationsBooked && this->getIContextNetwork())
{
this->getIContextNetwork()->readAtcBookingsFromSource(); // trigger new read
QTimer::singleShot(7500, this, SLOT(reloadAtcStationsBooked())); // deferred loading
}
else
{
this->ui->tvp_AtcStationsBooked->update(this->getIContextNetwork()->getAtcStationsBooked());
this->m_timestampLastReadBookedStations = QDateTime::currentDateTimeUtc();
}
}
void CAtcStationComponent::changedAtcStationsOnline()
{
// just update timestamp, data will be pulled by time
// just update timestamp, data will be pulled by time
// the timestamp will tell if there are newer data
this->m_timestampOnlineStationsChanged = QDateTime::currentDateTimeUtc();
}