Commit 723077eb authored by Eirik Aavitsland's avatar Eirik Aavitsland

Fix recently added auto test of text layout overflow

Ignore width of trailing space.

Fixes: QTBUG-91038
Change-Id: I74e278366a2c3b170335738bf6d6ee23933b361a
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit be4127d6)
Reviewed-by: default avatarEirik Aavitsland <eirik.aavitsland@qt.io>
parent d0dbb793
......@@ -1907,7 +1907,8 @@ void tst_QTextLayout::longText()
break;
}
layout.endLayout();
QVERIFY(layout.maximumWidth() <= QFIXED_MAX);
QFontMetricsF fm(layout.font());
QVERIFY(layout.maximumWidth() - fm.horizontalAdvance(' ') <= QFIXED_MAX);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment