aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-11-05 15:29:29 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-11-06 17:32:31 +0100
commitd316dc5686b22677384fa76ae7851db7dd50f2f7 (patch)
tree4cc83633cae19240d1af20f32bef98c51535f4ee
parentcd513c3e1767c7ca3626d4150609fd704c02e4f1 (diff)
Fix tst_QQuickText::fontSizeMode
The test hardcodes the height of the Text element to be 35, and then it does a pre-check that this is higher than the height of the font. This is obviously a bit flaky and caused an error because the font at the given size was 35.7 and was rounded up. I did attempt to make the logic a bit more dynamic, and have the object's initial height be based on the height of the font, but other parts of the test would then fail because they depend on the size of the object. In the end, the simplest way seemed to be to just decrease the font size until it fit inside the original Text height and leave it at that. Fixes: QTBUG-88207 Change-Id: I9c327806bde8c339b299302004dfb72b34e87bcd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--tests/auto/quick/qquicktext/data/fontSizeMode.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicktext/data/fontSizeMode.qml b/tests/auto/quick/qquicktext/data/fontSizeMode.qml
index 48e7c7b6d0..d5e794824f 100644
--- a/tests/auto/quick/qquicktext/data/fontSizeMode.qml
+++ b/tests/auto/quick/qquicktext/data/fontSizeMode.qml
@@ -16,7 +16,7 @@ Item {
height: 35
minimumPointSize: 8
minimumPixelSize: 8
- font.pixelSize: 25
+ font.pixelSize: 23
font.family: "Helvetica"
}
}