QQuickTextInput: calculate height of cursor rect using QTextLine::height()
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>
Thu, 4 Sep 2014 07:38:29 +0000 (09:38 +0200)
committerRichard Moe Gustavsen <richard.gustavsen@digia.com>
Wed, 10 Sep 2014 13:42:52 +0000 (15:42 +0200)
commitdac6bad5ba411ccc4e6e5fe18250a912d7e87b9c
tree9a8dd6a17d01a6fcf66b182e4493525ecda301d1
parentc5d9dc9367c3d3acf5fdf473c3288c8ccf2f2ef5
QQuickTextInput: calculate height of cursor rect using QTextLine::height()

Calculating the height of the line using ascent + descent seems
inaccurate, since the result will not match what ends up being
drawn. QQuickTextEdit uses instead QTextLine::height() for the
same function, and this works correct.
Since there seems to be no reason to reinvent how to calculate the
height when the line already has a function for that, and since the
result also seems to be wrong, we change the implementation to
use QTextLine::height().

Change-Id: I9c9cd4360b6d4cfd3582756c4efdff9c02065789
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
src/quick/items/qquicktextinput.cpp