diff --git a/src/blackmisc/datacache.cpp b/src/blackmisc/datacache.cpp index b9f226688..d2091fb93 100644 --- a/src/blackmisc/datacache.cpp +++ b/src/blackmisc/datacache.cpp @@ -192,19 +192,9 @@ namespace BlackMisc { if (! m_deferredChanges.isEmpty()) { - auto promises = m_cache->m_revision.loadedValuePromises(); - for (const auto &tuple : promises) - { - QObject *pageOwner = nullptr; - QString key; - std::tie(pageOwner, key, std::ignore) = tuple; - - m_deferredChanges.inhibit(pageOwner, key); // don't fire notification slots for objects waiting on syncLoad futures - } - m_deferredChanges.setSaved(); emit valuesLoadedFromStore(m_deferredChanges, CIdentifier::anonymous()); - deliverPromises(std::move(promises)); + deliverPromises(m_cache->m_revision.loadedValuePromises()); m_deferredChanges.clear(); } } diff --git a/src/blackmisc/valuecache.cpp b/src/blackmisc/valuecache.cpp index bc814c5f9..d0b6c335b 100644 --- a/src/blackmisc/valuecache.cpp +++ b/src/blackmisc/valuecache.cpp @@ -78,7 +78,6 @@ namespace BlackMisc { MetaType::registerMetadata(); qDBusRegisterMetaType(); - qDBusRegisterMetaType(); } //////////////////////////////// @@ -493,7 +492,7 @@ namespace BlackMisc QList notifySlots; - forEachIntersection(m_elements, values, [changedBy, this, ¬ifySlots, &values](const QString & key, const ElementPtr & element, CValueCachePacket::const_iterator it) + forEachIntersection(m_elements, values, [changedBy, this, ¬ifySlots, &values](const QString &, const ElementPtr & element, CValueCachePacket::const_iterator it) { if (changedBy == this) // round trip { @@ -508,7 +507,7 @@ namespace BlackMisc element->m_value.uniqueWrite() = it.value(); element->m_timestamp = it.timestamp(); element->m_saved = values.isSaved(); - if (element->m_notifySlot && ! notifySlots.contains(element->m_notifySlot) && ! values.isInhibited(parent(), key)) + if (element->m_notifySlot && ! notifySlots.contains(element->m_notifySlot)) { notifySlots.push_back(element->m_notifySlot); } diff --git a/src/blackmisc/valuecache.h b/src/blackmisc/valuecache.h index a19a4c2cd..ac006cba6 100644 --- a/src/blackmisc/valuecache.h +++ b/src/blackmisc/valuecache.h @@ -54,12 +54,6 @@ namespace BlackMisc //! Insert values from another packet. void insert(const CValueCachePacket &other) { CDictionary::insert(other); } - //! Add a page owner and key to the list of inhibited notifications. - void inhibit(QObject *pageOwner, const QString &key) { m_inhibitions.push_back(std::make_pair(reinterpret_cast(pageOwner), key)); } - - //! Query whether a particular owner/key pair should have its notification inhibited. - bool isInhibited(QObject *pageOwner, const QString &key) const { return m_inhibitions.contains(std::make_pair(reinterpret_cast(pageOwner), key)); } - //! Discard timestamps and return as variant map. CVariantMap toVariantMap() const; @@ -93,7 +87,6 @@ namespace BlackMisc private: BLACK_ENABLE_TUPLE_CONVERSION(CValueCachePacket) bool m_saved = false; - CSequence> m_inhibitions; }; /*! @@ -368,6 +361,6 @@ namespace BlackMisc } // namespace Q_DECLARE_METATYPE(BlackMisc::CValueCachePacket) -BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::CValueCachePacket, (attr(o.m_saved), attr(o.m_inhibitions))) +BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::CValueCachePacket, (attr(o.m_saved))) #endif