summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-08-04 18:13:25 +0200
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-08-07 10:09:17 +0000
commit7c8e95612e81e7beb0a665e5a617a6020c7d1953 (patch)
tree3d37bc13a28e26978fec01a98679fe158cecf07e /tests/auto/other
parent4d572362e882432a9cc8decbea2bcb16d4c7fbcb (diff)
Make tst_accessibility's characterRect match QAccessibleTextWidget::characterRect
The former didn't account for ascent and descent. Change-Id: If741f22f7e79ac3c13e58f2966358010d9f9ec81 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 8061b1ccb9..4f891fcda0 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -1725,7 +1725,7 @@ static QRect characterRect(const QTextEdit &edit, int offset)
int h = fm.height();
qreal x = line.cursorToX(relativeOffset);
- QRect r(layoutPosition.x() + x, layoutPosition.y() + line.y(), w, h);
+ QRect r(layoutPosition.x() + x, layoutPosition.y() + line.y() + line.ascent() + fm.descent() - h, w, h);
r.moveTo(edit.viewport()->mapToGlobal(r.topLeft()));
return r;