qt6-bb10/tests/auto/gui/text
Tor Arne Vestbø eeb0740f2e QTextHtmlParser: Handle fractional font-size pixel values
The CSS spec defines the font-size as being a length, which is a
combination of a real number and a unit. This applies to the 'px'
unit as well, so by treating px values as integers when parsing
we were failing to parse not only '12.5px' but also '12.0px'.

The code now uses QMetaType::fromType<qreal> but then sets the
resulting pixel type on the QFont as an integer, as QFont does
not support fractional pixel sizes.

Other code paths in the CSS parsing machinery use QString::toInt(),
either directly or via intValueHelper() or lengthValue(). The font
code path can potentially be ported over to these other APIs for
consistency, but to keep the patch simple this is left for a
follow-up.

Pick-to: 6.5 6.2 5.15
Change-Id: I972cfe0f3fa3c785efa18c7593d6a497ff28911c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 5731e3e185d3a69502b2bc4f1fee48c156b34c3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-13 12:08:27 +00:00
..
qabstracttextdocumentlayout Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
qcssparser QTextHtmlParser: Handle fractional font-size pixel values 2024-08-13 12:08:27 +00:00
qfont Change license for tests files 2024-02-04 09:56:42 +01:00
qfontcache Change license for tests files 2024-02-04 09:56:42 +01:00
qfontdatabase Support application fallbacks for common script 2024-05-21 07:24:03 +02:00
qfontmetrics Introduce flag to use typographical line metrics for fonts 2024-05-31 19:30:53 +02:00
qglyphrun Change license for tests files 2024-02-04 09:56:42 +01:00
qinputcontrol Change license for tests files 2024-02-04 09:56:42 +01:00
qrawfont Tests: check the output of QFile::open 2024-03-27 04:24:11 +01:00
qstatictext Change license for tests files 2024-02-04 09:56:42 +01:00
qsyntaxhighlighter Change license for tests files 2024-02-04 09:56:42 +01:00
qtextblock Change license for tests files 2024-02-04 09:56:42 +01:00
qtextcursor Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
qtextdocument Support SVG specific stroke styling properties 2024-05-14 21:48:12 +03:00
qtextdocumentfragment QTextHtmlImporter: don't forget to appendBlock after block tag closed 2024-03-01 08:01:45 -07:00
qtextdocumentlayout Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
qtextformat Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
qtextimagehandler QTextDocument: Add support for responsive images 2024-05-07 12:28:59 -07:00
qtextlayout Fix tst_QTextLayout::softHyphens failure with some fonts 2024-08-06 20:42:59 +00:00
qtextlist Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
qtextmarkdownimporter QTextMarkdownWriter: escape all backslashes 2024-03-26 00:47:37 -07:00
qtextmarkdownwriter Replace 'Qt Designer' and 'Qt Widgets Designer' in code 2024-05-16 13:04:41 +01:00
qtextobject Change license for tests files 2024-02-04 09:56:42 +01:00
qtextodfwriter Change license for tests files 2024-02-04 09:56:42 +01:00
qtextpiecetable Change license for tests files 2024-02-04 09:56:42 +01:00
qtextscriptengine Revert "Don't do font merging for PUA characters" 2024-03-18 09:09:07 +01:00
qtexttable Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
CMakeLists.txt Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00