summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-05-11 10:52:34 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-05-11 22:22:08 +0200
commit524c187af3bcd532f345eed61be7bd99732d0505 (patch)
tree200e499c0b82174fcaeb9cc68b2b2aeb611e726d /src
parent6d87f9a526e29da83e307d0e1ffe3b5bdb262091 (diff)
QProperty: Cleanup QPropertyAlias leftovers
This removes traces of QPropertyAlias which is internal API which is a) not really working even before this change (no compatibility with QBindableInterface due to QPropertyAlias not being derived from QUntypedPropertyData) b) not used anywhere For BIC reasons, we need to keep some methods still around until Qt 7, though. Change-Id: I5bb4735a4c88cba275dc2cc6e29a46ca09622059 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qproperty.cpp20
-rw-r--r--src/corelib/kernel/qproperty.h4
-rw-r--r--src/corelib/kernel/qproperty_p.h1
3 files changed, 4 insertions, 21 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp
index a1b2f83c5b..d8176a845a 100644
--- a/src/corelib/kernel/qproperty.cpp
+++ b/src/corelib/kernel/qproperty.cpp
@@ -571,10 +571,9 @@ QPropertyObserver::QPropertyObserver(ChangeHandler changeHandler)
d.setChangeHandler(changeHandler);
}
-QPropertyObserver::QPropertyObserver(QUntypedPropertyData *aliasedPropertyPtr)
+QPropertyObserver::QPropertyObserver(QUntypedPropertyData *)
{
- QPropertyObserverPointer d{this};
- d.setAliasedProperty(aliasedPropertyPtr);
+ // ### Qt 7: Remove, currently left for binary compatibility
}
/*! \internal
@@ -625,8 +624,6 @@ QPropertyObserver &QPropertyObserver::operator=(QPropertyObserver &&other) noexc
void QPropertyObserverPointer::unlink()
{
- if (ptr->next.tag() == QPropertyObserver::ObserverNotifiesAlias)
- ptr->aliasedPropertyData = nullptr;
if (ptr->next)
ptr->next->prev = ptr->prev;
if (ptr->prev)
@@ -642,13 +639,6 @@ void QPropertyObserverPointer::setChangeHandler(QPropertyObserver::ChangeHandler
ptr->next.setTag(QPropertyObserver::ObserverNotifiesChangeHandler);
}
-void QPropertyObserverPointer::setAliasedProperty(QUntypedPropertyData *property)
-{
- Q_ASSERT(ptr->next.tag() != QPropertyObserver::ObserverIsPlaceholder);
- ptr->aliasedPropertyData = property;
- ptr->next.setTag(QPropertyObserver::ObserverNotifiesAlias);
-}
-
void QPropertyObserverPointer::setBindingToNotify(QPropertyBindingPrivate *binding)
{
Q_ASSERT(ptr->next.tag() != QPropertyObserver::ObserverIsPlaceholder);
@@ -708,9 +698,6 @@ void QPropertyObserverPointer::notify(QUntypedPropertyData *propertyDataPtr)
*/
while (observer) {
QPropertyObserver *next = observer->next.data();
-
- char preventBug[1] = {'\0'}; // QTBUG-87245
- Q_UNUSED(preventBug);
switch (QPropertyObserver::ObserverTag(observer->next.tag())) {
case QPropertyObserver::ObserverNotifiesChangeHandler:
{
@@ -734,11 +721,10 @@ void QPropertyObserverPointer::notify(QUntypedPropertyData *propertyDataPtr)
next = protector.next();
break;
}
- case QPropertyObserver::ObserverNotifiesAlias:
- break;
case QPropertyObserver::ObserverIsPlaceholder:
// recursion is already properly handled somewhere else
break;
+ default: Q_UNREACHABLE();
}
observer = next;
}
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index f5513be73f..a2c2875a12 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -215,7 +215,6 @@ public:
enum ObserverTag {
ObserverNotifiesBinding, // observer was installed to notify bindings that obsverved property changed
ObserverNotifiesChangeHandler, // observer is a change handler, which runs on every change
- ObserverNotifiesAlias, // used for QPropertyAlias
ObserverIsPlaceholder // the observer before this one is currently evaluated in QPropertyObserver::notifyObservers.
};
protected:
@@ -237,7 +236,6 @@ private:
union {
QPropertyBindingPrivate *binding = nullptr;
ChangeHandler changeHandler;
- QUntypedPropertyData *aliasedPropertyData;
};
};
@@ -260,7 +258,7 @@ protected:
QUntypedPropertyData *aliasedProperty() const
{
- return aliasedPropertyData;
+ return nullptr;
}
private:
diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h
index d00094c54f..32ff31166c 100644
--- a/src/corelib/kernel/qproperty_p.h
+++ b/src/corelib/kernel/qproperty_p.h
@@ -105,7 +105,6 @@ struct QPropertyObserverPointer
void setBindingToNotify(QPropertyBindingPrivate *binding);
void setChangeHandler(QPropertyObserver::ChangeHandler changeHandler);
- void setAliasedProperty(QUntypedPropertyData *propertyPtr);
void notify(QUntypedPropertyData *propertyDataPtr);
#ifndef QT_NO_DEBUG