diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-14 07:39:54 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-14 07:39:54 (GMT) |
commit | 28a67ceafaf65b56c7795b41f9a645b1349cd346 (patch) | |
tree | dd7e61c4814e00611abc7b8e60740eb30fa244c6 /tests/auto/qdiriterator | |
parent | 6bd267a6af1ab5c10f4d70d8812ab76ffa6caffd (diff) | |
download | Qt-28a67ceafaf65b56c7795b41f9a645b1349cd346.zip Qt-28a67ceafaf65b56c7795b41f9a645b1349cd346.tar.gz Qt-28a67ceafaf65b56c7795b41f9a645b1349cd346.tar.bz2 |
Fixed qdiriterator test for Symbian
Diffstat (limited to 'tests/auto/qdiriterator')
-rw-r--r-- | tests/auto/qdiriterator/tst_qdiriterator.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp index 1419633..b0f7000 100644 --- a/tests/auto/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp @@ -52,6 +52,11 @@ #define Q_NO_SYMLINKS #endif +#if defined(Q_OS_SYMBIAN) +// Open C in Symbian doesn't support symbolic links to directories +#define Q_NO_SYMLINKS_TO_DIRS +#endif + Q_DECLARE_METATYPE(QDirIterator::IteratorFlags) Q_DECLARE_METATYPE(QDir::Filters) @@ -92,16 +97,20 @@ tst_QDirIterator::tst_QDirIterator() QFile::remove("entrylist/directory/entrylist4.lnk"); #ifndef Q_NO_SYMLINKS -#ifdef Q_OS_WIN || defined(Q_OS_SYMBIAN) +# if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) // ### Sadly, this is a platform difference right now. QFile::link("entrylist/file", "entrylist/linktofile.lnk"); +# ifndef Q_NO_SYMLINKS_TO_DIRS QFile::link("entrylist/directory", "entrylist/linktodirectory.lnk"); +# endif QFile::link("entrylist/nothing", "entrylist/brokenlink.lnk"); -#else +# else QFile::link("file", "entrylist/linktofile.lnk"); +# ifndef Q_NO_SYMLINKS_TO_DIRS QFile::link("directory", "entrylist/linktodirectory.lnk"); +# endif QFile::link("nothing", "entrylist/brokenlink.lnk"); -#endif +# endif #endif QFile("entrylist/writable").open(QIODevice::ReadWrite); } @@ -136,7 +145,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QString("entrylist") << QDirIterator::IteratorFlags(0) << QDir::Filters(QDir::NoFilter) << QStringList("*") << QString( -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) "entrylist/.," "entrylist/..," #endif @@ -145,7 +154,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() "entrylist/linktofile.lnk," #endif "entrylist/directory," -#ifndef Q_NO_SYMLINKS +#if !defined(Q_NO_SYMLINKS) && !defined(Q_NO_SYMLINKS_TO_DIRS) "entrylist/linktodirectory.lnk," #endif "entrylist/writable").split(','); @@ -154,7 +163,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QString("entrylist") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories | QDirIterator::FollowSymlinks) << QDir::Filters(QDir::NoFilter) << QStringList("*") << QString( -#if !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) "entrylist/.," "entrylist/..," "entrylist/directory/.," @@ -166,7 +175,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data() #endif "entrylist/directory," "entrylist/directory/dummy," -#ifndef Q_NO_SYMLINKS +#if !defined(Q_NO_SYMLINKS) && !defined(Q_NO_SYMLINKS_TO_DIRS) "entrylist/linktodirectory.lnk," #endif "entrylist/writable").split(','); @@ -200,11 +209,6 @@ void tst_QDirIterator::iterateRelativeDirectory() QFETCH(QStringList, nameFilters); QFETCH(QStringList, entries); -#if defined(Q_OS_SYMBIAN) - QEXPECT_FAIL("no flags", "Symlink to directories is currently unsupported by Open C", Continue); - QEXPECT_FAIL("QDir::Subdirectories | QDir::FollowSymlinks", "Symlink to directories is currently unsupported by Open C", Continue); -#endif // defined(Q_OS_SYMBIAN) - QDirIterator it(dirName, nameFilters, filters, flags); QStringList list; while (it.hasNext()) { |