summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcomplextext/tst_qcomplextext.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-04-27 11:39:09 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2011-04-29 11:02:24 +0200
commitbbbfc9b0eb373054aa4df7928c6472acc8f49c81 (patch)
tree0c82acba786e2b07e15957a207b888495bb0085d /tests/auto/qcomplextext/tst_qcomplextext.cpp
parentd64460fffb488eb2e7b90df58d3891338bad7948 (diff)
Another ugly hack to make bidi cursor work with Core Text
If the text is wrapped with LRE/LRO/RLE/RLO override/embed marks, Core Text in Mac OS X 10.5 doesn't produce an empty glyph at the beginning of the glyphs (while it does in Mac OS X 10.6), thus we need to prepend an empty glyph here, otherwise cursor position calculation will consider the first two characters as a ligature of the same glyph. Reviewed-by: Eskil (cherry picked from commit a36ac6c34bafa801c2c30d76f59e4a3594efc4d5)
Diffstat (limited to 'tests/auto/qcomplextext/tst_qcomplextext.cpp')
-rw-r--r--tests/auto/qcomplextext/tst_qcomplextext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qcomplextext/tst_qcomplextext.cpp b/tests/auto/qcomplextext/tst_qcomplextext.cpp
index 04943c5ceb..58b31b4aa4 100644
--- a/tests/auto/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/qcomplextext/tst_qcomplextext.cpp
@@ -214,6 +214,7 @@ void tst_QComplexText::bidiCursorMovement()
QTextOption option = layout.textOption();
option.setTextDirection(basicDir == QChar::DirL ? Qt::LeftToRight : Qt::RightToLeft);
layout.setTextOption(option);
+ layout.setCursorMoveStyle(QTextCursor::Visual);
bool moved;
int oldPos, newPos = 0;
qreal x, newX;