diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-14 11:23:31 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-19 12:58:22 +0000 |
commit | f7ac5968fc92d9c656b4c2f742ee8245a9692bb4 (patch) | |
tree | 4dbaddc3442c2e9fb5b1dd072d9f142002634411 /tests/baseline/shared/baselineprotocol.h | |
parent | 49e263ef4b1f5e03012a64ec137f3f3fc540ca9b (diff) |
QPolygon: de-inline setPoint()
In Qt 5 times, the core of QList::realloc() was out-of-line by design,
because it was independent of T.
Now that QList is QVector, its equivalent detachAndGrow() function on
QArrayDataPointer is inline and instantiated for each type anew. We
therefore need to be careful to not use detach()ing QList operations
in non-generic code inline code (in public, but also private,
headers), because (common) PCH builds force this code to be compiled
over and over again. Generic code is only instantiated when used in a
TU, so that's ok. But for non-generic code, the only option is to
de-inline.
If there is an effect on compile-times, it's hidden in the run-by-run
noise of building QtGui, but at least this entry is gone afterwards
from clang -ftime-trace:
**** Templates that took longest to instantiate:
[...]
4676 ms: QList<QPoint>::operator[] (261 times, avg 17 ms)
Added 'inline' to the definition of the setPoint(int, QPoint)
overload, since MinGW used to complain about it missing.
Task-number: QTBUG-97601
Pick-to: 6.3
Change-Id: Ie6f67da7ef39a16c98a7451d37b6d96531656392
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/baseline/shared/baselineprotocol.h')
0 files changed, 0 insertions, 0 deletions