mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 03:35:35 +08:00
ref #803, do not use synchronize from another thread
* changed info component to use admit * removed web service synchronize
This commit is contained in:
@@ -54,22 +54,13 @@ namespace BlackGui
|
||||
|
||||
void CDbLoadOverviewComponent::display()
|
||||
{
|
||||
if (this->isInitialized())
|
||||
{
|
||||
this->ps_setValues();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->showLoading();
|
||||
QTimer::singleShot(1000, this, &CDbLoadOverviewComponent::ps_setValues);
|
||||
}
|
||||
this->ps_setValues();
|
||||
}
|
||||
|
||||
void CDbLoadOverviewComponent::ps_setValues()
|
||||
{
|
||||
if (!sGui) { return; }
|
||||
if (!sGui->hasWebDataServices()) { return; }
|
||||
CDbLoadOverviewComponent::synchronizeCaches();
|
||||
|
||||
ui->le_AircraftIcaoCacheTs->setText(cacheTimestampForEntity(CEntityFlags::AircraftIcaoEntity));
|
||||
ui->le_AirlinesIcaoCacheTs->setText(cacheTimestampForEntity(CEntityFlags::AirlineIcaoEntity));
|
||||
@@ -186,11 +177,6 @@ namespace BlackGui
|
||||
return c < 0 ? "-" : QString::number(c);
|
||||
}
|
||||
|
||||
void CDbLoadOverviewComponent::synchronizeCaches()
|
||||
{
|
||||
sGui->getWebDataServices()->synchronizeDbCaches(CEntityFlags::AllDbEntities);
|
||||
}
|
||||
|
||||
void CDbLoadOverviewComponent::admitCaches()
|
||||
{
|
||||
sGui->getWebDataServices()->admitDbCaches(CEntityFlags::AllDbEntities);
|
||||
|
||||
@@ -69,9 +69,6 @@ namespace BlackGui
|
||||
//! Formatted count for entity
|
||||
static QString dbCountForEntity(BlackMisc::Network::CEntityFlags::Entity entity);
|
||||
|
||||
//! Synchronize caches
|
||||
static void synchronizeCaches();
|
||||
|
||||
//! Admit caches
|
||||
static void admitCaches();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user