diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-02 16:32:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-04 12:45:47 +0200 |
commit | 712ca9d95a92d62eda809c959998313413516aa9 (patch) | |
tree | 369870135d815d3db5b5942e32a4604b64bde724 /tests/auto/corelib/tools | |
parent | 2376a5c4e0ea930d43d9377f4e93738a20659097 (diff) |
Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.
Task-number: QTBUG-21872
Change-Id: I38f97ad379deafebef02c75d611343ca15640c8a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools')
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index e84eb95447..9bb3506133 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -197,9 +197,9 @@ QByteArray verifyZeroTermination(const QByteArray &ba) int baSize = ba.size(); char baTerminator = ba.constData()[baSize]; if ('\0' != baTerminator) - return QString::fromAscii( - "*** Result ('%1') not null-terminated: 0x%2 ***").arg(QString::fromAscii(ba)) - .arg(baTerminator, 2, 16, QChar('0')).toAscii(); + return QString::fromLatin1( + "*** Result ('%1') not null-terminated: 0x%2 ***").arg(QString::fromLatin1(ba)) + .arg(baTerminator, 2, 16, QChar('0')).toLatin1(); // Skip mutating checks on shared strings if (baDataPtr->ref.isShared()) @@ -210,12 +210,12 @@ QByteArray verifyZeroTermination(const QByteArray &ba) const_cast<char *>(baData)[baSize] = 'x'; if ('x' != ba.constData()[baSize]) { - return QString::fromAscii("*** Failed to replace null-terminator in " - "result ('%1') ***").arg(QString::fromAscii(ba)).toAscii(); + return QString::fromLatin1("*** Failed to replace null-terminator in " + "result ('%1') ***").arg(QString::fromLatin1(ba)).toLatin1(); } if (ba != baCopy) { - return QString::fromAscii( "*** Result ('%1') differs from its copy " - "after null-terminator was replaced ***").arg(QString::fromAscii(ba)).toAscii(); + return QString::fromLatin1( "*** Result ('%1') differs from its copy " + "after null-terminator was replaced ***").arg(QString::fromLatin1(ba)).toLatin1(); } const_cast<char *>(baData)[baSize] = '\0'; // Restore sanity diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp index 67c15682a2..f880390b79 100644 --- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp +++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp @@ -174,8 +174,8 @@ void tst_QCryptographicHash::files_data() { QTest::addColumn<QString>("filename"); QTest::addColumn<QCryptographicHash::Algorithm>("algorithm"); QTest::addColumn<QByteArray>("md5sum"); - QTest::newRow("data1") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5"); - QTest::newRow("data2") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e"); + QTest::newRow("data1") << QString::fromLatin1("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5"); + QTest::newRow("data2") << QString::fromLatin1("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e"); } diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp index 487007e4cf..2031bbb268 100644 --- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp @@ -103,15 +103,15 @@ void tst_QEasingCurve::type() QTest::ignoreMessage(QtWarningMsg, "QEasingCurve: Invalid curve type -9999"); curve.setType((QEasingCurve::Type)-9999); QCOMPARE(curve.type(), QEasingCurve::InCubic); - QTest::ignoreMessage(QtWarningMsg, QString::fromAscii("QEasingCurve: Invalid curve type %1") + QTest::ignoreMessage(QtWarningMsg, QString::fromLatin1("QEasingCurve: Invalid curve type %1") .arg(QEasingCurve::NCurveTypes).toLatin1().constData()); curve.setType(QEasingCurve::NCurveTypes); QCOMPARE(curve.type(), QEasingCurve::InCubic); - QTest::ignoreMessage(QtWarningMsg, QString::fromAscii("QEasingCurve: Invalid curve type %1") + QTest::ignoreMessage(QtWarningMsg, QString::fromLatin1("QEasingCurve: Invalid curve type %1") .arg(QEasingCurve::Custom).toLatin1().constData()); curve.setType(QEasingCurve::Custom); QCOMPARE(curve.type(), QEasingCurve::InCubic); - QTest::ignoreMessage(QtWarningMsg, QString::fromAscii("QEasingCurve: Invalid curve type %1") + QTest::ignoreMessage(QtWarningMsg, QString::fromLatin1("QEasingCurve: Invalid curve type %1") .arg(-1).toLatin1().constData()); curve.setType((QEasingCurve::Type)-1); QCOMPARE(curve.type(), QEasingCurve::InCubic); @@ -389,10 +389,10 @@ void tst_QEasingCurve::valueForProgress() for (int t = 0; t <= 100; t+= 10) { qreal ease = curve.valueForProgress(t/qreal(100)); - strInputs += QString::fromAscii(" << %1").arg(t); + strInputs += QString::fromLatin1(" << %1").arg(t); strOutputs += " << " + fixedToString(qRound(ease*10000)); } - QString str = QString::fromAscii(" QTest::newRow(\"%1\") << int(QEasingCurve::%2)\n" + QString str = QString::fromLatin1(" QTest::newRow(\"%1\") << int(QEasingCurve::%2)\n" " << (IntList() %3)\n" " << (RealList()%4);\n\n") .arg(strCurve) |