diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-02-04 12:50:22 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-02-04 18:02:34 +0100 |
commit | 8b485664e4700abf659555f556f020c1e89c0671 (patch) | |
tree | 8dd09d7c9b4fb1bd2e358adc4fd6b4844743e469 | |
parent | 7a738daa97436478a21b5dd31ba2312b2cb2df41 (diff) |
Fix flakiness in tst_QGlyphRun::drawRightToLeft
As described in 3279c8e7d72c5eee379fa8e4a2789acfe40445c0, we can't
depend on the widths of decoration to always be the same for
drawText() and equivalent drawStaticText/drawGlyphRun.
This is typically visible as an off-by-one when using the default
fonts on OpenSUSE.
Since this test was actually made to test positions of RTL glyphs,
we can just disable the decoration and simplify the text.
Fixes: QTBUG-89086
Change-Id: I139fe3e1c5e98d8b1d7e0e7c19645fd4717d1d95
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | tests/auto/gui/text/qglyphrun/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/gui/text/qglyphrun/BLACKLIST b/tests/auto/gui/text/qglyphrun/BLACKLIST index a653182a0d..d8fefd3d9f 100644 --- a/tests/auto/gui/text/qglyphrun/BLACKLIST +++ b/tests/auto/gui/text/qglyphrun/BLACKLIST @@ -1,5 +1,3 @@ [mixedScripts] ubuntu-18.04 ubuntu-20.04 -[drawRightToLeft] -opensuse-leap diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index 973a615d5e..77351e95a9 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -526,11 +526,7 @@ void tst_QGlyphRun::drawRightToLeft() textLayoutDraw.fill(Qt::white); drawGlyphs.fill(Qt::white); - QFont font; - font.setUnderline(true); - QTextLayout layout(s); - layout.setFont(font); layout.setCacheEnabled(true); layout.beginLayout(); layout.createLine(); |