mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-05 08:55:59 +08:00
refs #601 Simplify syncLoad and rename to synchronize.
Now it doesn't return anything, it just causes the next async get() to be synchronized with the latest loaded value. It does this by hooking into the queue introduced in the previous commit.
This commit is contained in:
@@ -74,6 +74,14 @@ namespace BlackMisc
|
||||
return result;
|
||||
}
|
||||
|
||||
CValueCachePacket CValueCachePacket::takeByKey(const QString &key)
|
||||
{
|
||||
auto copy = *this;
|
||||
remove(key);
|
||||
copy.removeByKeyIf([ = ](const QString &key2) { return key2 != key; });
|
||||
return copy;
|
||||
}
|
||||
|
||||
void CValueCachePacket::registerMetadata()
|
||||
{
|
||||
MetaType::registerMetadata();
|
||||
|
||||
Reference in New Issue
Block a user