From e8df0f74667f9b8c20630f10d1fa5d4c9d681355 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 24 Jul 2009 15:45:19 +0200 Subject: Make test more robust against the case-insensitive file system on Windows, and link against a regular Qt build. Reviewed-by: Trustme --- tests/auto/qfiledialog/tst_qfiledialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 50cab0e..78a9d74 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -402,7 +402,11 @@ void tst_QFiledialog::directory() // Check my way QList list = qFindChildren(&fd, "listView"); QVERIFY(list.count() > 0); +#ifdef Q_OS_WIN + QCOMPARE(list.at(0)->rootIndex().data().toString().toLower(), temp.dirName().toLower()); +#else QCOMPARE(list.at(0)->rootIndex().data().toString(), temp.dirName()); +#endif QNonNativeFileDialog *dlg = new QNonNativeFileDialog(0, "", tempPath); QCOMPARE(model->index(tempPath), model->index(dlg->directory().absolutePath())); QCOMPARE(model->index(tempPath).data(QFileSystemModel::FileNameRole).toString(), @@ -2029,6 +2033,7 @@ void tst_QFiledialog::task254490_selectFileMultipleTimes() void tst_QFiledialog::task257579_sideBarWithNonCleanUrls() { +#if defined QT_BUILD_INTERNAL QDir tempDir = QDir::temp(); QLatin1String dirname("autotest_task257579"); tempDir.rmdir(dirname); //makes sure it doesn't exist any more @@ -2044,6 +2049,7 @@ void tst_QFiledialog::task257579_sideBarWithNonCleanUrls() //all tests are finished, we can remove the temporary dir QVERIFY(tempDir.rmdir(dirname)); +#endif } -- cgit v0.12