diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-28 10:58:46 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-28 11:45:59 (GMT) |
commit | 7eba68adc4a7862d9474179592e5c8393a7acdbb (patch) | |
tree | 73014cabc8b10f46203844aeb40de574d97032dc /tests/auto/qfiledialog | |
parent | a20f8dcbeafa34b50ef69d1c5db0f17b09731d2a (diff) | |
parent | 3bf3981c7026de9017887d08312391b54fe8afc6 (diff) | |
download | Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.zip Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.tar.gz Qt-7eba68adc4a7862d9474179592e5c8393a7acdbb.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
configure.exe
src/corelib/io/io.pri
src/corelib/io/qfilesystemwatcher.cpp
tests/auto/qfileinfo/tst_qfileinfo.cpp
tools/configure/configureapp.cpp
Diffstat (limited to 'tests/auto/qfiledialog')
-rw-r--r-- | tests/auto/qfiledialog/tst_qfiledialog.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index f9c8bdd..86bf237 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -403,7 +403,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(), @@ -2044,6 +2048,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 @@ -2055,10 +2060,16 @@ void tst_QFiledialog::task257579_sideBarWithNonCleanUrls() QCOMPARE(sidebar->urls().count(), 1); QVERIFY(sidebar->urls().first().toLocalFile() != url); QCOMPARE(sidebar->urls().first().toLocalFile(), QDir::cleanPath(url)); + +#ifdef Q_OS_WIN + QCOMPARE(sidebar->model()->index(0,0).data().toString().toLower(), tempDir.dirName().toLower()); +#else QCOMPARE(sidebar->model()->index(0,0).data().toString(), tempDir.dirName()); +#endif //all tests are finished, we can remove the temporary dir QVERIFY(tempDir.rmdir(dirname)); +#endif } |