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>
bb10
parent
316389c123
commit
36709d7dd5
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public:
|
|||
}
|
||||
void setTimestamp(quint64 timestamp) override;
|
||||
qsizetype pointCount() const { return m_points.count(); }
|
||||
QEventPoint &point(qsizetype i) { return m_points[i]; }
|
||||
QEventPoint &point(qsizetype i);
|
||||
const QList<QEventPoint> &points() const { return m_points; }
|
||||
QEventPoint *pointById(int id);
|
||||
bool allPointsGrabbed() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue