summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qpropertyprivate.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-11-25 13:02:56 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-11-30 23:02:29 +0000
commit76743374e75df72311f25349b1274256eaddfc75 (patch)
tree69c98fb1a111c6e42c62e2d09465d0acdb5afba2 /src/corelib/kernel/qpropertyprivate.h
parentf538ce920ec94e07124ebc77f01a00706aa8f4ae (diff)
Remove ExtraBit and FlagMask from QPropertyBindingData
They are not needed and removing it can simplify the code in some places and avoid a couple of masking operations. Change-Id: I0e4241a2784026aa89deed35f408b094e89a11a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit b1be6e6e6f355bfcb0c3814516f6009c91d2de89) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qpropertyprivate.h')
-rw-r--r--src/corelib/kernel/qpropertyprivate.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/corelib/kernel/qpropertyprivate.h b/src/corelib/kernel/qpropertyprivate.h
index 10bf4ca828..8887b86ce3 100644
--- a/src/corelib/kernel/qpropertyprivate.h
+++ b/src/corelib/kernel/qpropertyprivate.h
@@ -229,6 +229,8 @@ public:
QPropertyBindingData &operator=(QPropertyBindingData &&other) = delete;
~QPropertyBindingData();
+ static inline constexpr quintptr BindingBit = 0x1; // Is d_ptr pointing to a binding (1) or list of notifiers (0)?
+
bool hasBinding() const { return d_ptr & BindingBit; }
QUntypedPropertyBinding setBinding(const QUntypedPropertyBinding &newBinding,
@@ -244,19 +246,6 @@ public:
void registerWithCurrentlyEvaluatingBinding() const;
void notifyObservers(QUntypedPropertyData *propertyDataPtr) const;
- void setExtraBit(bool b)
- {
- if (b)
- d_ptr |= ExtraBit;
- else
- d_ptr &= ~ExtraBit;
- }
-
- bool extraBit() const { return d_ptr & ExtraBit; }
-
- static const quintptr ExtraBit = 0x1; // Used for QProperty<bool> specialization
- static const quintptr BindingBit = 0x2; // Is d_ptr pointing to a binding (1) or list of notifiers (0)?
- static const quintptr FlagMask = BindingBit | ExtraBit;
};
template <typename T, typename Tag>