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>2022-05-12 08:18:50 +0200
commit79af79e9fdbd2a4d52a4e8994eb58cfddfeb8e9b (patch)
tree17ef042338e558075f1e70cfb4007829841df89c
parentbba59e282eaf570fb2e4aa65da52048836dd18b9 (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> (cherry picked from commit d316dc5686b22677384fa76ae7851db7dd50f2f7)
-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"
}
}