diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 0e51226b34..e249dcfb44 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -102,7 +102,7 @@ QUntypedPropertyBinding QPropertyBase::setBinding(const QUntypedPropertyBinding if (auto *existingBinding = d.bindingPtr()) { if (existingBinding == newBinding.data()) - return QUntypedPropertyBinding(oldBinding); + return QUntypedPropertyBinding(oldBinding.data()); oldBinding = QPropertyBindingPrivatePtr(existingBinding); oldBinding->unlinkAndDeref(); d_ptr &= FlagMask; @@ -119,15 +119,15 @@ QUntypedPropertyBinding QPropertyBase::setBinding(const QUntypedPropertyBinding d_ptr &= ~BindingBit; } - return QUntypedPropertyBinding(oldBinding); + return QUntypedPropertyBinding(oldBinding.data()); } -QPropertyBindingPrivatePtr QPropertyBase::binding() +QPropertyBindingPrivate *QPropertyBase::binding() { QPropertyBasePointer d{this}; if (auto binding = d.bindingPtr()) - return QPropertyBindingPrivatePtr(binding); - return QPropertyBindingPrivatePtr(); + return binding; + return nullptr; } QPropertyBindingPrivate *QPropertyBasePointer::bindingPtr() const diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h index 609bb85221..8f050327d5 100644 --- a/src/corelib/kernel/qproperty.h +++ b/src/corelib/kernel/qproperty.h @@ -137,7 +137,7 @@ public: QMetaType valueMetaType() const; - explicit QUntypedPropertyBinding(const QPropertyBindingPrivatePtr &priv); + explicit QUntypedPropertyBinding(QPropertyBindingPrivate *priv); private: friend class QtPrivate::QPropertyBase; friend class QPropertyBindingPrivate; diff --git a/src/corelib/kernel/qpropertybinding.cpp b/src/corelib/kernel/qpropertybinding.cpp index 8fdf770d18..358977e63e 100644 --- a/src/corelib/kernel/qpropertybinding.cpp +++ b/src/corelib/kernel/qpropertybinding.cpp @@ -134,7 +134,7 @@ QUntypedPropertyBinding &QUntypedPropertyBinding::operator=(QUntypedPropertyBind return *this; } -QUntypedPropertyBinding::QUntypedPropertyBinding(const QPropertyBindingPrivatePtr &priv) +QUntypedPropertyBinding::QUntypedPropertyBinding(QPropertyBindingPrivate *priv) : d(priv) { } diff --git a/src/corelib/kernel/qpropertyprivate.h b/src/corelib/kernel/qpropertyprivate.h index 1329ec6682..4b0b09d9db 100644 --- a/src/corelib/kernel/qpropertyprivate.h +++ b/src/corelib/kernel/qpropertyprivate.h @@ -83,7 +83,7 @@ public: bool hasBinding() const { return d_ptr & BindingBit; } QUntypedPropertyBinding setBinding(const QUntypedPropertyBinding &newBinding, void *propertyDataPtr); - QPropertyBindingPrivatePtr binding(); + QPropertyBindingPrivate *binding(); void evaluateIfDirty(); void removeBinding();