QFileSystemEngine/Unix: fix typos and correct comments
Change-Id: I4d90d8ea8d25b89c9e8dfffd0210fc99e0d5ac3e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
e1d418bcd0
commit
5d28c05ba8
@ -900,13 +900,13 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
|||||||
}
|
}
|
||||||
if (what & QFileSystemMetaData::AliasType)
|
if (what & QFileSystemMetaData::AliasType)
|
||||||
what |= QFileSystemMetaData::LinkType;
|
what |= QFileSystemMetaData::LinkType;
|
||||||
#endif
|
#endif // defined(Q_OS_DARWIN)
|
||||||
#ifdef UF_HIDDEN
|
#ifdef UF_HIDDEN
|
||||||
if (what & QFileSystemMetaData::HiddenAttribute) {
|
if (what & QFileSystemMetaData::HiddenAttribute) {
|
||||||
// OS X >= 10.5: st_flags & UF_HIDDEN
|
// OS X >= 10.5: st_flags & UF_HIDDEN
|
||||||
what |= QFileSystemMetaData::PosixStatFlags;
|
what |= QFileSystemMetaData::PosixStatFlags;
|
||||||
}
|
}
|
||||||
#endif // defined(Q_OS_DARWIN)
|
#endif
|
||||||
|
|
||||||
// if we're asking for any of the stat(2) flags, then we're getting them all
|
// if we're asking for any of the stat(2) flags, then we're getting them all
|
||||||
if (what & QFileSystemMetaData::PosixStatFlags)
|
if (what & QFileSystemMetaData::PosixStatFlags)
|
||||||
@ -929,7 +929,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
|||||||
// entry still exist are EACCES, EFAULT, ENOMEM and EOVERFLOW. If we get
|
// entry still exist are EACCES, EFAULT, ENOMEM and EOVERFLOW. If we get
|
||||||
// EACCES or ENOMEM, then we have no choice on how to proceed, so we may
|
// EACCES or ENOMEM, then we have no choice on how to proceed, so we may
|
||||||
// as well conclude it doesn't exist; EFAULT can't happen and EOVERFLOW
|
// as well conclude it doesn't exist; EFAULT can't happen and EOVERFLOW
|
||||||
// shouldn't happen because we build in _LARGEFIE64.
|
// shouldn't happen because we build in _LARGEFILE64.
|
||||||
union {
|
union {
|
||||||
QT_STATBUF statBuffer;
|
QT_STATBUF statBuffer;
|
||||||
struct statx statxBuffer;
|
struct statx statxBuffer;
|
||||||
@ -939,7 +939,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
|||||||
mode_t mode = 0;
|
mode_t mode = 0;
|
||||||
statResult = qt_lstatx(nativeFilePath, &statxBuffer);
|
statResult = qt_lstatx(nativeFilePath, &statxBuffer);
|
||||||
if (statResult == -ENOSYS) {
|
if (statResult == -ENOSYS) {
|
||||||
// use lstst(2)
|
// use lstat(2)
|
||||||
statResult = QT_LSTAT(nativeFilePath, &statBuffer);
|
statResult = QT_LSTAT(nativeFilePath, &statBuffer);
|
||||||
if (statResult == 0)
|
if (statResult == 0)
|
||||||
mode = statBuffer.st_mode;
|
mode = statBuffer.st_mode;
|
||||||
@ -954,7 +954,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
|||||||
data.entryFlags |= QFileSystemMetaData::LinkType;
|
data.entryFlags |= QFileSystemMetaData::LinkType;
|
||||||
statResult = -1; // force stat(2) below
|
statResult = -1; // force stat(2) below
|
||||||
} else {
|
} else {
|
||||||
// it's a reagular file and it exists
|
// it's a regular file and it exists
|
||||||
if (statResult)
|
if (statResult)
|
||||||
data.fillFromStatxBuf(statxBuffer);
|
data.fillFromStatxBuf(statxBuffer);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user