QProperty: Force inlining of addObserver

The method is only called in two places: observerProperty (which only
takes care of calling unlink, too, if necessary) and in
registerWithCurrentlyEvaluatingBinding_helper. In the first case, the
method most likely gets inlined anyway. In the latter case, we really
want to avoid the overhead of an additional function call to speed up
registration of the property with the binding. Considering that it is an
internal method, there is no need to worry about code explosion.

Pick-to: 6.2
Change-Id: I3f0f0e37108f3859321d3b432e37fc8da3c15dc0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
Fabian Kosmale 2021-06-28 11:20:23 +02:00
parent e5aff7f3d9
commit 77d528f8d3
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ struct Q_AUTOTEST_EXPORT QPropertyBindingDataPointer
d = reinterpret_cast<quintptr>(observer);
}
static void fixupAfterMove(QtPrivate::QPropertyBindingData *ptr);
void addObserver(QPropertyObserver *observer);
void Q_ALWAYS_INLINE addObserver(QPropertyObserver *observer);
void setFirstObserver(QPropertyObserver *observer);
QPropertyObserverPointer firstObserver() const;