Adjust tst_qabstracttextdocumentlayout for border cases
OpenSUSE 42.1 failed this case for some reason. With this change the test tests the anchor from the middle of the string instead of looking for it from the end. Task-number: QTBUG-51345 Change-Id: I2fc7496399f46926f261c7a1f48756bfaf782f7b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>bb10
parent
4e551aeb0e
commit
d8f4d4452d
|
|
@ -156,7 +156,7 @@ void tst_QAbstractTextDocumentLayout::anchorAt()
|
|||
|
||||
// anchorAt on start returns link
|
||||
QRect linkBr = metrics.boundingRect("foo");
|
||||
QPointF linkPoint(linkBr.width() + blockStart.x(), (linkBr.height() / 2) + blockStart.y());
|
||||
QPointF linkPoint((linkBr.width() / 2) + blockStart.x(), (linkBr.height() / 2) + blockStart.y());
|
||||
QCOMPARE(documentLayout->anchorAt(linkPoint), QString("link"));
|
||||
|
||||
// anchorAt() on top of preedit at end should not assert
|
||||
|
|
|
|||
Loading…
Reference in New Issue