diff options
Diffstat (limited to 'tests/auto/other/qcomplextext/tst_qcomplextext.cpp')
-rw-r--r-- | tests/auto/other/qcomplextext/tst_qcomplextext.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp index 1b944bf1b6..b8014126ed 100644 --- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp +++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QtGui/QtGui> @@ -84,7 +84,7 @@ void tst_QComplexText::bidiReorderString() if (si.analysis.bidiLevel % 2) { // reverse sub QChar *a = sub.data(); - QChar *b = a + sub.length() - 1; + QChar *b = a + sub.size() - 1; while (a < b) { QChar tmp = *a; *a = *b; @@ -93,7 +93,7 @@ void tst_QComplexText::bidiReorderString() --b; } a = (QChar *)sub.unicode(); - b = a + sub.length(); + b = a + sub.size(); while (a<b) { *a = a->mirroredChar(); ++a; @@ -315,7 +315,7 @@ static void testBidiString(const QString &data, int paragraphDirection, if (si.analysis.bidiLevel % 2) { // reverse sub QChar *a = sub.data(); - QChar *b = a + sub.length() - 1; + QChar *b = a + sub.size() - 1; while (a < b) { QChar tmp = *a; *a = *b; @@ -324,7 +324,7 @@ static void testBidiString(const QString &data, int paragraphDirection, --b; } a = (QChar *)sub.unicode(); - b = a + sub.length(); + b = a + sub.size(); // while (a<b) { // *a = a->mirroredChar(); // ++a; @@ -347,9 +347,7 @@ void tst_QComplexText::bidiCharacterTest() { QString testFile = QFINDTESTDATA("data/BidiCharacterTest.txt"); QFile f(testFile); - QVERIFY(f.exists()); - - f.open(QIODevice::ReadOnly); + QVERIFY(f.open(QIODevice::ReadOnly)); int linenum = 0; while (!f.atEnd()) { @@ -441,9 +439,7 @@ void tst_QComplexText::bidiTest() { QString testFile = QFINDTESTDATA("data/BidiTest.txt"); QFile f(testFile); - QVERIFY(f.exists()); - - f.open(QIODevice::ReadOnly); + QVERIFY(f.open(QIODevice::ReadOnly)); int linenum = 0; QList<int> resolvedLevels; |