qt5base-lts/tests/auto/gui
Eskil Abrahamsen Blomfeldt ee2ad9df70 Add QFontMetrics(F)::horizontalAdvance() function
A source of constant confusion is the QFontMetrics::width() function,
which does not return the bounding width of the text, but the advance
width. We deprecate this and add horizontalAdvance() instead, to avoid the
confusion in the future.

Note that there was an internal width() overload which was only there
for the purpose of supporting the Qt::TextBypassShaping flag. This
flag has already been replaced by public API, so no such
overload is added. Instead, we deprecate the TextBypassShaping flag
as well, which makes sense, since a replacement has been made.

Also note that there was a consistency problem with QFontMetrics and
QFontMetricsF, which are supposed to be interchangeable. The
QFontMetrics::width() functions for strings took an optional int length
argument, while the floating point version did not. This error is
corrected in the advance() functions.

[ChangeLog][QtGui][Text] Added QFontMetrics::horizontalAdvance() and
QFontMetricsF::horizontalAdvance() to replace the confusingly named
width() function. The latter has now been deprecated.

Change-Id: I0dfda43aa65c8235be32c62fade82cae05b29c79
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-14 16:28:45 +00:00
..
image Merge remote-tracking branch 'origin/5.9' into 5.10 2017-09-20 11:58:32 +02:00
itemmodels Correct QStandardItemModel::setItemData to follow QAbstractItemModel 2017-10-17 12:28:23 +00:00
kernel Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2017-11-06 14:25:20 +00:00
math3d Use qRadiansToDegrees() and qDegreesToRadians() more widely 2017-07-05 10:15:34 +00:00
painting Remove references to obsolete platforms 2017-11-05 06:33:53 +00:00
qopengl Merge remote-tracking branch 'origin/5.10' into dev 2017-10-24 13:40:55 +02:00
qopenglconfig Fix tst_QOpenGlConfig for platforms with builtin test data 2017-06-19 07:05:59 +00:00
qvulkan Merge remote-tracking branch 'origin/5.10' into dev 2017-10-17 10:34:24 +02:00
text Add QFontMetrics(F)::horizontalAdvance() function 2017-11-14 16:28:45 +00:00
util GLSL 1.00 ES must be selected using "#version 100" 2017-08-04 11:19:30 +00:00
gui.pro Basic Vulkan enablers 2017-03-17 16:12:03 +00:00