diff options
Diffstat (limited to 'tests/auto/installer/mkdiroperationtest/tst_mkdiroperationtest.cpp')
-rw-r--r-- | tests/auto/installer/mkdiroperationtest/tst_mkdiroperationtest.cpp | 36 |
1 files 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()); } }; |