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:
Mathew Sutcliffe
2016-03-10 00:09:14 +00:00
parent 06ad77ee9d
commit c6a038aaa8
4 changed files with 64 additions and 38 deletions

View File

@@ -60,6 +60,9 @@ namespace BlackMisc
//! Discard values and return as map of timestamps.
QMap<QString, qint64> toTimestampMap() const;
//! Remove value matching the given key, and return it in a separate packet.
CValueCachePacket takeByKey(const QString &key);
//! \copydoc BlackMisc::Mixin::MetaType::registerMetadata
static void registerMetadata();
@@ -330,8 +333,9 @@ namespace BlackMisc
QVariant getVariantCopy() const { return m_page.getValueCopy(m_element).getQVariant(); }
bool isValid() const { return m_page.isValid(m_element, qMetaTypeId<T>()); }
Private::CValuePage &m_page;
Private::CValuePage::Element &m_element;
protected:
Private::CValuePage &m_page; //!< \private
Private::CValuePage::Element &m_element; //!< \private
};
/*!