summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcomplextext
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-04-27 09:39:09 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-04-27 10:58:15 (GMT)
commita36ac6c34bafa801c2c30d76f59e4a3594efc4d5 (patch)
treede90d37eec6b9de049ac12ee4640fa0d6c93d60a /tests/auto/qcomplextext
parentdcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec (diff)
downloadQt-a36ac6c34bafa801c2c30d76f59e4a3594efc4d5.zip
Qt-a36ac6c34bafa801c2c30d76f59e4a3594efc4d5.tar.gz
Qt-a36ac6c34bafa801c2c30d76f59e4a3594efc4d5.tar.bz2
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
Diffstat (limited to 'tests/auto/qcomplextext')
-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 04943c5..58b31b4 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;