summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-06-28 11:20:23 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-08-04 19:31:52 +0200
commit77d528f8d328d43fa367bd4887ad21b5e6b6311e (patch)
tree8a1871dc51d3ebe3741034da77deb402de35b9d5 /src
parente5aff7f3d9e90860fe24b8fe931a71e115f5413b (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qproperty_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h
index 33bcc72ad7..96e89926db 100644
--- a/src/corelib/kernel/qproperty_p.h
+++ b/src/corelib/kernel/qproperty_p.h
@@ -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;