qt5base-lts/tests/benchmarks/widgets
David Faure bb2f4d08d9 QTextDocument/QGraphicsTextItem: skip layout in setTextWidth(0)
In a QGraphicsTextItem without a width yet, there's no need to do any
layouting. The use case is obviously items with an app-defined size,
not the default where text items adapt to their contents.

Results:
 0.065 msecs to create a QGraphicsTextItem with some text (layouted)
 0.036 msecs to set everything up in a QGraphicsTextItem with 0 width

QTextEdit was abusing the width 0 to mean "no wrap, width comes from
contents", but since the value -1 means that already in QTextDocument,
QTextEdit now uses a width of -1 for that meaning.

Change-Id: I67ad59c305e5dd34830886e4e6c56dde03c93668
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-17 22:37:40 +02:00
..
graphicsview QTextDocument/QGraphicsTextItem: skip layout in setTextWidth(0) 2022-05-17 22:37:40 +02:00
itemviews Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
kernel Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
styles Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
widgets Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
CMakeLists.txt Convert remaining tests/benchmarks 2019-11-04 15:48:51 +00:00