Add const to some methods
Change-Id: I60e93e0c9b57468ef4188bdb60a32fb9ac9046e1 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>bb10
parent
9d2b43de19
commit
4294e82fe9
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ protected:
|
|||
}
|
||||
|
||||
private:
|
||||
void setSource(QtPrivate::QPropertyBase &property);
|
||||
void setSource(const QtPrivate::QPropertyBase &property);
|
||||
|
||||
QTaggedPointer<QPropertyObserver, ObserverTag> next;
|
||||
// prev is a pointer to the "next" element within the previous node, or to the "firstObserverPtr" if it is the
|
||||
|
|
|
|||
|
|
@ -96,13 +96,13 @@ public:
|
|||
void *propertyDataPtr, void *staticObserver = nullptr,
|
||||
QPropertyObserverCallback staticObserverCallback = nullptr,
|
||||
QPropertyGuardFunction guardCallback = nullptr);
|
||||
QPropertyBindingPrivate *binding();
|
||||
QPropertyBindingPrivate *binding() const;
|
||||
|
||||
void evaluateIfDirty();
|
||||
void evaluateIfDirty() const;
|
||||
void removeBinding();
|
||||
|
||||
void registerWithCurrentlyEvaluatingBinding() const;
|
||||
void notifyObservers(void *propertyDataPtr);
|
||||
void notifyObservers(void *propertyDataPtr) const;
|
||||
|
||||
void setExtraBit(bool b)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue