From d13bd1f242ca9b2bd440a6c03784d405e5cd11de Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 29 Jul 2013 16:51:43 +0200 Subject: Fix Qt5 build. Change-Id: Id1e0e513e979275cb206e116e19f3b6d969bd363 Reviewed-by: Tim Jenssen Reviewed-by: Niels Weber --- .../mkdiroperationtest/tst_mkdiroperationtest.cpp | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/auto/installer/mkdiroperationtest/tst_mkdiroperationtest.cpp b/tests/auto/installer/mkdiroperationtest/tst_mkdiroperationtest.cpp index fd427400d..8eef8d2b2 100644 --- a/tests/auto/installer/mkdiroperationtest/tst_mkdiroperationtest.cpp +++ b/tests/auto/installer/mkdiroperationtest/tst_mkdiroperationtest.cpp @@ -90,14 +90,14 @@ private slots: QFETCH(QString, directory); QString path = QDir::current().path() + QDir::toNativeSeparators(directory); - QVERIFY2(!QDir(path).exists(), path.toAscii()); + QVERIFY2(!QDir(path).exists(), path.toLatin1()); MkdirOperation op; op.setArguments(QStringList() << path); op.backup(); - QVERIFY2(op.performOperation(), op.errorString().toAscii()); - QVERIFY2(QDir(path).exists(), path.toAscii()); - QVERIFY2(op.undoOperation(), op.errorString().toAscii()); - QVERIFY2(!QDir(path).exists(), path.toAscii()); + QVERIFY2(op.performOperation(), op.errorString().toLatin1()); + QVERIFY2(QDir(path).exists(), path.toLatin1()); + QVERIFY2(op.undoOperation(), op.errorString().toLatin1()); + QVERIFY2(!QDir(path).exists(), path.toLatin1()); } void testCreateDirectory_customFile_data() @@ -116,23 +116,23 @@ private slots: QString path = QDir::current().path() + QDir::toNativeSeparators(directory); QString filepath = QDir::current().path() + QDir::toNativeSeparators(filename); - QVERIFY2(!QDir(path).exists(), path.toAscii()); + QVERIFY2(!QDir(path).exists(), path.toLatin1()); MkdirOperation op; op.setArguments(QStringList() << path); op.backup(); - QVERIFY2(op.performOperation(), op.errorString().toAscii()); - QVERIFY2(QDir(path).exists(), path.toAscii()); + QVERIFY2(op.performOperation(), op.errorString().toLatin1()); + QVERIFY2(QDir(path).exists(), path.toLatin1()); QFile file(filepath); file.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&file); out << "This file is generated by QTest\n"; file.close(); - QVERIFY2(!op.undoOperation(), op.errorString().toAscii()); - QVERIFY2(file.exists(), filepath.toAscii()); + QVERIFY2(!op.undoOperation(), op.errorString().toLatin1()); + QVERIFY2(file.exists(), filepath.toLatin1()); QVERIFY2(QDir(filepath).remove(filepath), "Could not remove file"); - QVERIFY2(!file.exists(), filepath.toAscii()); - QVERIFY2(op.undoOperation(), op.errorString().toAscii()); - QVERIFY2(!QDir(path).exists(), path.toAscii()); + QVERIFY2(!file.exists(), filepath.toLatin1()); + QVERIFY2(op.undoOperation(), op.errorString().toLatin1()); + QVERIFY2(!QDir(path).exists(), path.toLatin1()); } void testCreateDirectory_customFile_force_data() @@ -147,20 +147,20 @@ private slots: QString path = QDir::current().path() + QDir::toNativeSeparators(directory); QString filepath = QDir::current().path() + QDir::toNativeSeparators(filename); - QVERIFY2(!QDir(path).exists(), path.toAscii()); + QVERIFY2(!QDir(path).exists(), path.toLatin1()); MkdirOperation op; op.setArguments(QStringList() << path); op.setValue("forceremoval",true); op.backup(); - QVERIFY2(op.performOperation(), op.errorString().toAscii()); - QVERIFY2(QDir(path).exists(), path.toAscii()); + QVERIFY2(op.performOperation(), op.errorString().toLatin1()); + QVERIFY2(QDir(path).exists(), path.toLatin1()); QFile file(filepath); file.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&file); out << "This file is generated by QTest\n"; file.close(); - QVERIFY2(op.undoOperation(), op.errorString().toAscii()); - QVERIFY2(!file.exists(), path.toAscii()); + QVERIFY2(op.undoOperation(), op.errorString().toLatin1()); + QVERIFY2(!file.exists(), path.toLatin1()); } }; -- cgit v1.2.3