summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qpropertyprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qpropertyprivate.h')
-rw-r--r--src/corelib/kernel/qpropertyprivate.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/corelib/kernel/qpropertyprivate.h b/src/corelib/kernel/qpropertyprivate.h
index a3fe2d208e..caf08ee5ee 100644
--- a/src/corelib/kernel/qpropertyprivate.h
+++ b/src/corelib/kernel/qpropertyprivate.h
@@ -158,6 +158,7 @@ template <typename T>
class QPropertyData;
namespace QtPrivate {
+struct BindingEvaluationState;
struct BindingFunctionVTable
{
@@ -238,14 +239,26 @@ public:
QPropertyObserverCallback staticObserverCallback = nullptr,
QPropertyBindingWrapper bindingWrapper = nullptr);
- QPropertyBindingPrivate *binding() const;
+ QPropertyBindingPrivate *binding() const
+ {
+ if (d_ptr & BindingBit)
+ return reinterpret_cast<QPropertyBindingPrivate*>(d_ptr - BindingBit);
+ return nullptr;
+
+ }
void evaluateIfDirty(const QUntypedPropertyData *property) const;
void removeBinding();
+ void registerWithCurrentlyEvaluatingBinding(QtPrivate::BindingEvaluationState *currentBinding) const
+ {
+ if (!currentBinding)
+ return;
+ registerWithCurrentlyEvaluatingBinding_helper(currentBinding);
+ }
void registerWithCurrentlyEvaluatingBinding() const;
+ void registerWithCurrentlyEvaluatingBinding_helper(BindingEvaluationState *currentBinding) const;
void notifyObservers(QUntypedPropertyData *propertyDataPtr) const;
-
};
template <typename T, typename Tag>