diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-08-13 10:24:45 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-28 22:31:28 +0200 |
commit | 4294e82fe921105bfe137595394705f1c6b16904 (patch) | |
tree | 8fe0b2447c7a9e866cf4da00dd8c8da2b25142b4 /src/corelib/kernel/qproperty.cpp | |
parent | 9d2b43de19eebc836683e00ca0516a59cb6abe5d (diff) |
Add const to some methods
Change-Id: I60e93e0c9b57468ef4188bdb60a32fb9ac9046e1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.cpp')
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 926ccdd8de..6336bd5c58 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -292,7 +292,7 @@ QUntypedPropertyBinding QPropertyBase::setBinding(const QUntypedPropertyBinding return QUntypedPropertyBinding(oldBinding.data()); } -QPropertyBindingPrivate *QPropertyBase::binding() +QPropertyBindingPrivate *QPropertyBase::binding() const { QPropertyBasePointer d{this}; if (auto binding = d.bindingPtr()) @@ -323,7 +323,7 @@ QPropertyBindingPrivate *QPropertyBindingPrivate::currentlyEvaluatingBinding() return currentBindingEvaluationState ? currentBindingEvaluationState->binding : nullptr; } -void QPropertyBase::evaluateIfDirty() +void QPropertyBase::evaluateIfDirty() const { QPropertyBasePointer d{this}; QPropertyBindingPrivate *binding = d.bindingPtr(); @@ -358,7 +358,7 @@ void QPropertyBase::registerWithCurrentlyEvaluatingBinding() const dependencyObserver.observeProperty(d); } -void QPropertyBase::notifyObservers(void *propertyDataPtr) +void QPropertyBase::notifyObservers(void *propertyDataPtr) const { QPropertyBasePointer d{this}; if (QPropertyObserverPointer observer = d.firstObserver()) @@ -385,7 +385,7 @@ QPropertyObserver::QPropertyObserver(void *aliasedPropertyPtr) d.setAliasedProperty(aliasedPropertyPtr); } -void QPropertyObserver::setSource(QPropertyBase &property) +void QPropertyObserver::setSource(const QPropertyBase &property) { QPropertyObserverPointer d{this}; QPropertyBasePointer propPrivate{&property}; |