Fix font size calculation in headings in StyledText.
authorYann Bodson <yann.bodson@nokia.com>
Tue, 21 Feb 2012 04:11:04 +0000 (14:11 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 23 Feb 2012 02:00:31 +0000 (03:00 +0100)
commit12f0663dbda6ae56d3307493ca34212f601dd3aa
treee3f9087898a31550fb36f9b8144a9f5ea0ecf7ca
parenta08546507fe0ce356e4183e557d9408295c80610
Fix font size calculation in headings in StyledText.

Calculate the font size correctly even when the size is specified
in pixels and update this size when the font changes.
Also make sure that the text layout's font is set before parsing.

Task-number: QTBUG-24458

Change-Id: Ida7723f6e4f4b9fd3a6878076f4beaf5bda8f7f7
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
src/quick/items/qquicktext.cpp
src/quick/items/qquicktext_p_p.h
src/quick/util/qdeclarativestyledtext.cpp
src/quick/util/qdeclarativestyledtext_p.h
tests/auto/qtquick2/qdeclarativestyledtext/tst_qdeclarativestyledtext.cpp
tests/auto/qtquick2/qquicktext/data/pixelFontSizes.qml [new file with mode: 0644]
tests/auto/qtquick2/qquicktext/data/pointFontSizes.qml [new file with mode: 0644]
tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp