mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
refs #787, caches/model set loader
* Caches initialized * simulators with model set
This commit is contained in:
@@ -88,6 +88,21 @@ namespace BlackMisc
|
||||
return true;
|
||||
}
|
||||
|
||||
CSimulatorInfo IMultiSimulatorModelCaches::simulatorsWithInitializedCache() const
|
||||
{
|
||||
static const QDateTime outdated = QDateTime::currentDateTimeUtc().addDays(-365 * 5);
|
||||
CSimulatorInfo withInitializedCache;
|
||||
for (const CSimulatorInfo &simInfo : CSimulatorInfo::allSimulators().asSingleSimulatorSet())
|
||||
{
|
||||
const QDateTime ts = this->getCacheTimestamp(simInfo);
|
||||
if (ts.isValid() && ts > outdated)
|
||||
{
|
||||
withInitializedCache.add(simInfo);
|
||||
}
|
||||
}
|
||||
return withInitializedCache;
|
||||
}
|
||||
|
||||
CModelCaches::CModelCaches(bool synchronizeCache, QObject *parent) : IMultiSimulatorModelCaches(parent)
|
||||
{
|
||||
this->m_currentSimulator.synchronize();
|
||||
|
||||
Reference in New Issue
Block a user