summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qabstracttextdocumentlayout
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2016-02-18 11:26:38 +0200
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2016-02-25 07:37:49 +0000
commitd8f4d4452d4a4435e647ffa7c3fce63b25fdb5d3 (patch)
treef236c9c6f58d30de242c72a4a7d3f15dd954a79d /tests/auto/gui/text/qabstracttextdocumentlayout
parent4e551aeb0e202397aafc5c6d09137acee98c9404 (diff)
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>
Diffstat (limited to 'tests/auto/gui/text/qabstracttextdocumentlayout')
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
index d3404e335a..15fb392b18 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
@@ -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