mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #626 Serializer gets its baseline values when it actually starts loading/saving, instead of just when the cache requests the load/save.
This commit is contained in:
@@ -140,19 +140,17 @@ namespace BlackMisc
|
||||
|
||||
void CDataCache::saveToStoreAsync(const BlackMisc::CValueCachePacket &values)
|
||||
{
|
||||
auto baseline = getAllValuesWithTimestamps();
|
||||
QTimer::singleShot(0, &m_serializer, [this, baseline, values]
|
||||
QTimer::singleShot(0, &m_serializer, [this, values]
|
||||
{
|
||||
m_serializer.saveToStore(values.toVariantMap(), baseline);
|
||||
m_serializer.saveToStore(values.toVariantMap(), getAllValuesWithTimestamps());
|
||||
});
|
||||
}
|
||||
|
||||
void CDataCache::loadFromStoreAsync()
|
||||
{
|
||||
auto baseline = getAllValuesWithTimestamps();
|
||||
QTimer::singleShot(0, &m_serializer, [this, baseline]
|
||||
QTimer::singleShot(0, &m_serializer, [this]
|
||||
{
|
||||
m_serializer.loadFromStore(baseline);
|
||||
m_serializer.loadFromStore(getAllValuesWithTimestamps());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user