summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qproperty.h')
-rw-r--r--src/corelib/kernel/qproperty.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index 5e1d8ec2f6..21b2ed0839 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -387,6 +387,13 @@ struct QPropertyObserverPointer;
struct Q_CORE_EXPORT QPropertyObserver
{
+ // Internal
+ enum ObserverTag {
+ ObserverNotifiesBinding = 0x0,
+ ObserverNotifiesChangeHandler = 0x1,
+ };
+ Q_DECLARE_FLAGS(ObserverTags, ObserverTag)
+
QPropertyObserver() = default;
QPropertyObserver(QPropertyObserver &&other);
QPropertyObserver &operator=(QPropertyObserver &&other);
@@ -402,10 +409,10 @@ protected:
private:
void setSource(QtPrivate::QPropertyBase &property);
- QtPrivate::QTaggedPointer<QPropertyObserver> next;
+ QTaggedPointer<QPropertyObserver, ObserverTags> next;
// prev is a pointer to the "next" element within the previous node, or to the "firstObserverPtr" if it is the
// first node.
- QtPrivate::QPropertyTagPreservingPointerToPointer<QPropertyObserver> prev;
+ QtPrivate::QTagPreservingPointerToPointer<QPropertyObserver, ObserverTags> prev;
union {
QPropertyBindingPrivate *bindingToMarkDirty = nullptr;
@@ -416,8 +423,11 @@ private:
QPropertyObserver &operator=(const QPropertyObserver &) = delete;
friend struct QPropertyObserverPointer;
+ friend struct QPropertyBasePointer;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPropertyObserver::ObserverTags)
+
template <typename Functor>
class QPropertyChangeHandler : public QPropertyObserver
{