diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-04 09:16:41 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-04 21:36:54 +0000 |
commit | 36709d7dd59435d34a5192bef14f5e239d3886f2 (patch) | |
tree | 7b9ea7330f7d1bdba8aa8c4672a9456fae9e57a2 /src/gui/kernel/qevent.cpp | |
parent | 316389c123affbc7f96d6377769481d23db37dab (diff) |
QPointerEvent: de-inline point(i)
This function contributed 1.2s of the total 361s (0.34%) to KDDockWidgets
compilation time, according to a trace generated by Sergio Martins:
**** Time summary:
Compilation (146 times):
Parsing (frontend): 343.2 s
Codegen & opts (backend): 18.1 s
**** Templates that took longest to instantiate:
[...]
1228 ms: QList<QEventPoint>::operator[] (59 times, avg 20 ms)
1213 ms: QList<QEventPoint>::detach (59 times, avg 20 ms)
1209 ms: QArrayDataPointer<QEventPoint>::detach (59 times, avg 20 ms)
1202 ms: QArrayDataPointer<QEventPoint>::reallocateAndGrow (59 times, avg 20 ms)
Task-number: QTBUG-97601
Pick-to: 6.3
Change-Id: I5f4ff9843f7deff9f390c465df28cba3391e048b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 6617057b42..81496edacd 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -257,10 +257,12 @@ QInputEvent::~QInputEvent() */ /*! - \fn QEventPoint &QPointerEvent::point(qsizetype i) - Returns a QEventPoint reference for the point at index \a i. */ +QEventPoint &QPointerEvent::point(qsizetype i) +{ + return m_points[i]; +} /*! \fn const QList<QEventPoint> &QPointerEvent::points() const |