Skip to content

Commit

Permalink
tst_qtextscriptengine: make it compilable under MSVC2010
Browse files Browse the repository at this point in the history
Source files which contain UTF-8 literals can not be compiled
by MSVC with Chinese/Japanese locale.

Change-Id: I5daa2e45c5e1ceb86da91e72288c24018c49c0f6
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
Reviewed-by: Konstantin Ritt <[email protected]>
  • Loading branch information
dbzhang800 authored and Qt by Nokia committed Jun 26, 2012
1 parent 5211f45 commit 744a31f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,11 @@ void tst_QTextScriptEngine::thaiWithZWJ()
#ifdef Q_OS_WIN
QSKIP("This test currently fails on Windows - QTBUG-24565");
#endif
QString s(QString::fromUtf8("ร‍ร‌.ร.“ร…ร”ร\xA0ร本ร") + QChar(0x0363)/*superscript 'a', for testing Inherited class*/);
QString s(QString::fromUtf8("\xe0\xb8\xa3\xe2\x80\x8d\xe0\xb8\xa3\xe2\x80"
"\x8c\x2e\xe0\xb8\xa3\x2e\xe2\x80\x9c\xe0\xb8"
"\xa3\xe2\x80\xa6\xe0\xb8\xa3\xe2\x80\x9d\xe0"
"\xb8\xa3\xa0\xe0\xb8\xa3\xe6\x9c\xac\xe0\xb8\xa3")
+ QChar(0x0363)/*superscript 'a', for testing Inherited class*/);
QTextLayout layout(s);
layout.setCacheEnabled(true);
layout.beginLayout();
Expand Down Expand Up @@ -1334,7 +1338,7 @@ void tst_QTextScriptEngine::thaiWithZWJ()

void tst_QTextScriptEngine::thaiMultipleVowels()
{
QString s(QString::fromUtf8(""));
QString s(QString::fromUtf8("\xe0\xb8\xaa"));
for (int i = 0; i < 100; i++)
s += QChar(0x0E47); // Add lots of "VOWEL SIGN MAI TAI KHU N/S-T" stacked on top of the character
s += QChar(0x200D); // Now add a zero width joiner (which adds a circle which is hidden)
Expand Down

0 comments on commit 744a31f

Please sign in to comment.