mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T177, added direct write flag because only direct writes require a consolidation
This commit is contained in:
@@ -156,11 +156,12 @@ namespace BlackCore
|
||||
return true;
|
||||
}
|
||||
|
||||
void CBackgroundDataUpdater::onModelsPublished(const CAircraftModelList &modelsPublished)
|
||||
void CBackgroundDataUpdater::onModelsPublished(const CAircraftModelList &modelsPublished, bool directWrite)
|
||||
{
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
if (modelsPublished.isEmpty()) { return; }
|
||||
if (!m_updatePublishedModels) { return; }
|
||||
if (!directWrite) { return; } // those models are CRs and have to be released first
|
||||
|
||||
emit this->consolidating(true);
|
||||
this->syncModelOrModelSetCacheWithDbData(m_modelCaches, modelsPublished);
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BlackCore
|
||||
bool doWorkCheck() const;
|
||||
|
||||
//! Models have been published
|
||||
void onModelsPublished(const BlackMisc::Simulation::CAircraftModelList &modelsPublished);
|
||||
void onModelsPublished(const BlackMisc::Simulation::CAircraftModelList &modelsPublished, bool directWrite);
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace BlackCore
|
||||
emit this->publishedModels(modelsPublished, modelsSkipped, msgs, sendingSuccessful, directWrite);
|
||||
if (!modelsPublished.isEmpty())
|
||||
{
|
||||
emit this->publishedModelsSimplified(modelsPublished);
|
||||
emit this->publishedModelsSimplified(modelsPublished, directWrite);
|
||||
}
|
||||
Q_UNUSED(c);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace BlackCore
|
||||
bool sendingSuccessful, bool directWrite);
|
||||
|
||||
//! Published models, simplified version of publishedModels
|
||||
void publishedModelsSimplified(const BlackMisc::Simulation::CAircraftModelList &modelsPublished);
|
||||
void publishedModelsSimplified(const BlackMisc::Simulation::CAircraftModelList &modelsPublished, bool directWrite);
|
||||
|
||||
private:
|
||||
BlackMisc::Network::CUrlLogList m_writeLog;
|
||||
|
||||
Reference in New Issue
Block a user