Use QString::toLatin1() rather than ::toAscii()

The toAscii (and fromAscii) are removed from Qt5 in favor of Latin1.
This commit is contained in:
Ben Boeckel 2013-11-24 21:19:20 +01:00 committed by Felix Geyer
parent 03e4b2d13c
commit 66b3d22041
7 changed files with 16 additions and 16 deletions

View file

@ -33,7 +33,7 @@ namespace QTest {
char* toString(const Uuid& uuid)
{
QByteArray ba = "Uuid(";
ba += uuid.toBase64().toAscii().constData();
ba += uuid.toBase64().toLatin1().constData();
ba += ")";
return qstrdup(ba.constData());
}
@ -296,7 +296,7 @@ void TestKeePass2XmlReader::testEntry2()
QVERIFY(attrs.isEmpty());
QCOMPARE(entry->attachments()->keys().size(), 1);
QCOMPARE(QString::fromAscii(entry->attachments()->value("myattach.txt")), QString("abcdefghijk"));
QCOMPARE(QString::fromLatin1(entry->attachments()->value("myattach.txt")), QString("abcdefghijk"));
QCOMPARE(entry->autoTypeEnabled(), true);
QCOMPARE(entry->autoTypeObfuscation(), 1);