]> git.pld-linux.org Git - packages/qt4.git/blob - qt4-git.patch
Typo in Req tag (thanks glen)
[packages/qt4.git] / qt4-git.patch
1 commit ca89c49fa2c5cbb3945897046f33eed9f7da846c
2 Author: Jiang Jiang <jiang.jiang@nokia.com>
3 Date:   Tue Jul 3 10:17:49 2012 +0200
4
5     Fix cursor truncate to include line position
6     
7     Since we could have moved the line position (QTextLine::setPosition),
8     the truncating position should be adjusted with that.
9     
10     Change-Id: Ie1acd4a1b6a4adfbeeb9ce8ee2dfa19d992470e8
11     Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12
13 diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
14 index 16f7150..52f2793 100644
15 --- a/src/gui/text/qtextlayout.cpp
16 +++ b/src/gui/text/qtextlayout.cpp
17 @@ -2616,8 +2616,8 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const
18          x += eng->offsetInLigature(si, pos, end, glyph_pos);
19      }
20  
21 -    if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.width)
22 -        x = line.width;
23 +    if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.x + line.width)
24 +        x = line.x + line.width;
25  
26      *cursorPos = pos + si->position;
27      return x.toReal();
This page took 0.054204 seconds and 3 git commands to generate.