mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f1a69d749d
commit
83082d3f63
@@ -37,11 +37,8 @@ namespace BlackMisc
|
|||||||
void CSettingsCache::saveToStoreByPacket(const CValueCachePacket &values)
|
void CSettingsCache::saveToStoreByPacket(const CValueCachePacket &values)
|
||||||
{
|
{
|
||||||
CStatusMessage status = saveToFiles(persistentStore(), values.toVariantMap());
|
CStatusMessage status = saveToFiles(persistentStore(), values.toVariantMap());
|
||||||
if (! status.isEmpty())
|
|
||||||
{
|
|
||||||
CLogMessage(this).preformatted(status);
|
CLogMessage(this).preformatted(status);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
BlackMisc::CStatusMessage CSettingsCache::loadFromStore()
|
BlackMisc::CStatusMessage CSettingsCache::loadFromStore()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
CVariantMap temp;
|
CVariantMap temp;
|
||||||
temp.convertFromJson(json.object());
|
temp.convertFromJson(json.object());
|
||||||
temp.removeByKeyIf([&keys](const QString &key) { return keys.contains(key); }); // TODO optimize by skipping files
|
temp.removeByKeyIf([&keys](const QString & key) { return ! keys.contains(key); }); // TODO optimize by skipping files
|
||||||
temp.removeDuplicates(currentValues);
|
temp.removeDuplicates(currentValues);
|
||||||
o_values.insert(temp, QFileInfo(file).lastModified().toMSecsSinceEpoch());
|
o_values.insert(temp, QFileInfo(file).lastModified().toMSecsSinceEpoch());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user