mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25: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)
|
void CDataCache::saveToStoreAsync(const BlackMisc::CValueCachePacket &values)
|
||||||
{
|
{
|
||||||
auto baseline = getAllValuesWithTimestamps();
|
QTimer::singleShot(0, &m_serializer, [this, values]
|
||||||
QTimer::singleShot(0, &m_serializer, [this, baseline, values]
|
|
||||||
{
|
{
|
||||||
m_serializer.saveToStore(values.toVariantMap(), baseline);
|
m_serializer.saveToStore(values.toVariantMap(), getAllValuesWithTimestamps());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDataCache::loadFromStoreAsync()
|
void CDataCache::loadFromStoreAsync()
|
||||||
{
|
{
|
||||||
auto baseline = getAllValuesWithTimestamps();
|
QTimer::singleShot(0, &m_serializer, [this]
|
||||||
QTimer::singleShot(0, &m_serializer, [this, baseline]
|
|
||||||
{
|
{
|
||||||
m_serializer.loadFromStore(baseline);
|
m_serializer.loadFromStore(getAllValuesWithTimestamps());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user