summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp3
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 5762d94..569801a 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -890,6 +890,9 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
if ((baseName.size() > 0 && baseName.at(0) == QLatin1Char('.'))
# if !defined(QWS) && defined(Q_OS_MAC)
|| _q_isMacHidden(d->filePath)
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ || d->st.st_flags & UF_HIDDEN
+# endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
# endif
) {
ret |= HiddenFlag;
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index f61426d..c7dce28 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -190,6 +190,8 @@ tst_QFileInfo::~tst_QFileInfo()
QFile::remove("link.lnk");
QFile::remove("file1");
QFile::remove("dummyfile");
+ QFile::remove("simplefile.txt");
+ QFile::remove("longFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileName.txt");
#ifdef Q_OS_SYMBIAN
QFile::remove("hidden.txt");
QFile::remove("nothidden.txt");
@@ -199,6 +201,7 @@ tst_QFileInfo::~tst_QFileInfo()
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
QDir().rmdir("./.hidden-directory");
+ QFile::remove("link_to_tst_qfileinfo");
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
QDir().rmdir("./hidden-directory");
@@ -1128,6 +1131,8 @@ void tst_QFileInfo::isHidden_data()
#if defined(Q_OS_MAC)
// /bin has the hidden attribute on Mac OS X
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true;
+ QTest::newRow("/dev/") << QString::fromLatin1("/dev/") << true;
+ QTest::newRow("/net/") << QString::fromLatin1("/net/") << true;
#elif !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << false;
#endif