summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfiledialog
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-24 13:45:19 (GMT)
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-24 13:45:19 (GMT)
commite8df0f74667f9b8c20630f10d1fa5d4c9d681355 (patch)
tree10efedac54527a356ff1839d3ae9e904e7f499fb /tests/auto/qfiledialog
parent03b8a4cca5f4523f9fe50434193b938171f8f2f9 (diff)
downloadQt-e8df0f74667f9b8c20630f10d1fa5d4c9d681355.zip
Qt-e8df0f74667f9b8c20630f10d1fa5d4c9d681355.tar.gz
Qt-e8df0f74667f9b8c20630f10d1fa5d4c9d681355.tar.bz2
Make test more robust against the case-insensitive file system on Windows,
and link against a regular Qt build. Reviewed-by: Trustme
Diffstat (limited to 'tests/auto/qfiledialog')
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp6
1 files changed, 6 insertions, 0 deletions
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<QListView*> list = qFindChildren<QListView*>(&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
}