mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T292, Ref T285 signal when "real" loading was started (loading from disk)
This commit is contained in:
@@ -220,10 +220,18 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
virtual void synchronizeCache(const CSimulatorInfo &simulator) = 0;
|
||||
|
||||
//! Synchronize multiple simulators
|
||||
//! \threadsafe
|
||||
virtual void synchronizeMultiCaches(const CSimulatorInfo &simulator);
|
||||
|
||||
//! Admit the cache for given simulator
|
||||
//! \threadsafe
|
||||
virtual void admitCache(const CSimulatorInfo &simulator) = 0;
|
||||
|
||||
//! Synchronize multiple simulators
|
||||
//! \threadsafe
|
||||
virtual void admitMultiCaches(const CSimulatorInfo &simulator);
|
||||
|
||||
//! Info string about models in cache
|
||||
QString getInfoString() const;
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ namespace BlackMisc
|
||||
if (mode.testFlag(LoadInBackground))
|
||||
{
|
||||
if (m_parserWorker && !m_parserWorker->isFinished()) { return; }
|
||||
emit this->diskLoadingStarted(simulator, mode);
|
||||
m_parserWorker = BlackMisc::CWorker::fromTask(this, "CAircraftCfgParser::changeDirectory",
|
||||
[this, modelDirs, excludedDirectoryPatterns, simulator, modelConsolidation]()
|
||||
{
|
||||
@@ -110,6 +111,8 @@ namespace BlackMisc
|
||||
}
|
||||
else if (mode == LoadDirectly)
|
||||
{
|
||||
emit this->diskLoadingStarted(simulator, mode);
|
||||
|
||||
bool ok;
|
||||
CStatusMessageList msgs;
|
||||
m_parsedCfgEntriesList = performParsing(modelDirs, excludedDirectoryPatterns, msgs, &ok);
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace BlackMisc
|
||||
if (mode.testFlag(LoadInBackground))
|
||||
{
|
||||
if (m_parserWorker && !m_parserWorker->isFinished()) { return; }
|
||||
emit this->diskLoadingStarted(simulator, mode);
|
||||
m_parserWorker = BlackMisc::CWorker::fromTask(this, "CAircraftModelLoaderXPlane::performParsing",
|
||||
[this, modelDirs, excludedDirectoryPatterns, modelConsolidation]()
|
||||
{
|
||||
@@ -157,8 +158,9 @@ namespace BlackMisc
|
||||
}
|
||||
else if (mode.testFlag(LoadDirectly))
|
||||
{
|
||||
CAircraftModelList models(performParsing(this->getFirstModelDirectoryOrDefault(), excludedDirectoryPatterns));
|
||||
updateInstalledModels(models);
|
||||
emit this->diskLoadingStarted(simulator, mode);
|
||||
CAircraftModelList models(this->performParsing(this->getFirstModelDirectoryOrDefault(), excludedDirectoryPatterns));
|
||||
this->updateInstalledModels(models);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user