Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtTest]

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: I6f3fa6a06ed037f3a98387958ba7ab18c3e04977
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
bb10
Thiago Macieira 2012-05-02 16:32:26 +02:00 committed by Qt by Nokia
parent de3e06a9e2
commit 3ea4e7b90d
2 changed files with 3 additions and 3 deletions

View File

@ -191,7 +191,7 @@ namespace QTest {
int formatResult(char * buffer, int bufferSize, T number, int significantDigits)
{
QString result = formatResult(number, significantDigits);
qstrncpy(buffer, result.toAscii().constData(), bufferSize);
qstrncpy(buffer, result.toLatin1().constData(), bufferSize);
int size = result.count();
return size;
}
@ -260,7 +260,7 @@ void QPlainTestLogger::printBenchmarkResult(const QBenchmarkResult &result)
buf1, sizeof(buf1), "%s: %s::%s",
bmtag,
QTestResult::currentTestObjectName(),
result.context.slotName.toAscii().data());
result.context.slotName.toLatin1().data());
char bufTag[1024];
bufTag[0] = 0;

View File

@ -205,7 +205,7 @@ namespace QTest
static const char *mouseActionNames[] =
{ "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" };
QString warning = QString::fromLatin1("Mouse event \"%1\" not accepted by receiving widget");
QTest::qWarn(warning.arg(QString::fromLatin1(mouseActionNames[static_cast<int>(action)])).toAscii().data());
QTest::qWarn(warning.arg(QString::fromLatin1(mouseActionNames[static_cast<int>(action)])).toLatin1().data());
}
}