summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qcomplextext
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-01-13 15:48:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-13 22:46:50 +0100
commit882bf3475c8926abe62ed71e6719458b024caac0 (patch)
treef227c1c660776da1ece9149b1c9e3ca5b27d8687 /tests/auto/other/qcomplextext
parent81157d23749f6ee1feef35a04fa9cc989ebc01eb (diff)
expand tabs and related whitespace fixes in *.{cpp,h,qdoc}
the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other/qcomplextext')
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index ff440948a2..7eb8479372 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
@@ -102,12 +102,12 @@ void tst_QComplexText::bidiReorderString_data()
const LV *data = logical_visual;
while ( data->name ) {
- //next we fill it with data
- QTest::newRow( data->name )
- << QString::fromUtf8( data->logical )
- << QString::fromUtf8( data->visual )
- << (int) data->basicDir;
- data++;
+ //next we fill it with data
+ QTest::newRow( data->name )
+ << QString::fromUtf8( data->logical )
+ << QString::fromUtf8( data->visual )
+ << (int) data->basicDir;
+ data++;
}
}
@@ -127,34 +127,34 @@ void tst_QComplexText::bidiReorderString()
int nitems = e.layoutData->items.size();
int i;
for (i = 0; i < nitems; ++i) {
- //qDebug("item %d bidiLevel=%d", i, e.items[i].analysis.bidiLevel);
- levels[i] = e.layoutData->items[i].analysis.bidiLevel;
+ //qDebug("item %d bidiLevel=%d", i, e.items[i].analysis.bidiLevel);
+ levels[i] = e.layoutData->items[i].analysis.bidiLevel;
}
e.bidiReorder(nitems, levels, visualOrder);
QString visual;
for (i = 0; i < nitems; ++i) {
- QScriptItem &si = e.layoutData->items[visualOrder[i]];
- QString sub = logical.mid(si.position, e.length(visualOrder[i]));
- if (si.analysis.bidiLevel % 2) {
- // reverse sub
- QChar *a = (QChar *)sub.unicode();
- QChar *b = a + sub.length() - 1;
- while (a < b) {
- QChar tmp = *a;
- *a = *b;
- *b = tmp;
- ++a;
- --b;
- }
- a = (QChar *)sub.unicode();
- b = a + sub.length();
- while (a<b) {
- *a = a->mirroredChar();
- ++a;
- }
- }
- visual += sub;
+ QScriptItem &si = e.layoutData->items[visualOrder[i]];
+ QString sub = logical.mid(si.position, e.length(visualOrder[i]));
+ if (si.analysis.bidiLevel % 2) {
+ // reverse sub
+ QChar *a = (QChar *)sub.unicode();
+ QChar *b = a + sub.length() - 1;
+ while (a < b) {
+ QChar tmp = *a;
+ *a = *b;
+ *b = tmp;
+ ++a;
+ --b;
+ }
+ a = (QChar *)sub.unicode();
+ b = a + sub.length();
+ while (a<b) {
+ *a = a->mirroredChar();
+ ++a;
+ }
+ }
+ visual += sub;
}
// replace Unicode newline back with \n to compare.
visual.replace(QChar(0x2028), QChar('\n'));