summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-11-19 00:00:10 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-11-19 00:00:10 (GMT)
commit2b417c9b7c878bbf49e685509b0e4b411f7b00ba (patch)
treec6ee5716f1ca5529ddbadbca6e0b92e25babd881 /tests
parent5ed8a8f0a6ff2dbb4d0836d58d3916a04cca8d4b (diff)
parentfdd3fca40a3fc31762b637952884903816b50786 (diff)
downloadQt-2b417c9b7c878bbf49e685509b0e4b411f7b00ba.zip
Qt-2b417c9b7c878bbf49e685509b0e4b411f7b00ba.tar.gz
Qt-2b417c9b7c878bbf49e685509b0e4b411f7b00ba.tar.bz2
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qcomplextext/tst_qcomplextext.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qcomplextext/tst_qcomplextext.cpp b/tests/auto/qcomplextext/tst_qcomplextext.cpp
index fa8a2d1..c66d452 100644
--- a/tests/auto/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/qcomplextext/tst_qcomplextext.cpp
@@ -45,6 +45,7 @@
#if !defined(Q_WS_MAC)
#include <QtTest/QtTest>
+#include <QtGui/QtGui>
#include <private/qtextengine_p.h>
#include "bidireorderstring.h"
@@ -69,6 +70,7 @@ private slots:
void bidiReorderString_data();
void bidiReorderString();
void bidiCursor_qtbug2795();
+ void bidiCursor_PDF();
};
tst_QComplexText::tst_QComplexText()
@@ -183,6 +185,20 @@ void tst_QComplexText::bidiCursor_qtbug2795()
QVERIFY(x1 == x2);
}
+void tst_QComplexText::bidiCursor_PDF()
+{
+ QString str = QString::fromUtf8("\342\200\252hello\342\200\254");
+ QTextLayout layout(str);
+
+ layout.beginLayout();
+ QTextLine line = layout.createLine();
+ layout.endLayout();
+
+ int size = str.size();
+
+ QVERIFY(line.cursorToX(size) == line.cursorToX(size - 1));
+}
+
QTEST_MAIN(tst_QComplexText)
#include "tst_qcomplextext.moc"