Take leading space width into account for painting and selection
authorJiang Jiang <jiang.jiang@nokia.com>
Tue, 19 Apr 2011 12:40:19 +0000 (14:40 +0200)
committerJiang Jiang <jiang.jiang@nokia.com>
Fri, 29 Apr 2011 09:02:24 +0000 (11:02 +0200)
commit044e7602ae72889f363d688dbe0d73cec5f0636a
treea7f1289e0b4449cea6d61835e50c92b1de958b42
parentd6232575848384f364cecb13f98926989863e852
Take leading space width into account for painting and selection

When painting horizontally centered RTL text and selection with
trailing spaces, we need to take that space width into account
because line.textAdvance doesn't include it.

Task-number: QTBUG-18612
Reviewed-by: Eskil
(cherry picked from commit 224226727f07e8940e0d3131fe7587b11cc4a6ca)
src/gui/text/qtextengine.cpp
src/gui/text/qtextlayout.cpp