diff options
author | Thomas Zander <t.zander@nokia.com> | 2010-09-10 13:15:43 (GMT) |
---|---|---|
committer | Thomas Zander <t.zander@nokia.com> | 2010-09-10 13:15:43 (GMT) |
commit | cc23ac99d68af5c9bf537e5451b7ee7c7698e954 (patch) | |
tree | fe91ec2dd40894369ce0b76f9c74c2e140765486 /src/corelib/io/qfilesystemengine.cpp | |
parent | 69b8cf630e9cc83cd678814bf88495c7fbb438f4 (diff) | |
download | Qt-cc23ac99d68af5c9bf537e5451b7ee7c7698e954.zip Qt-cc23ac99d68af5c9bf537e5451b7ee7c7698e954.tar.gz Qt-cc23ac99d68af5c9bf537e5451b7ee7c7698e954.tar.bz2 |
Move resolving of user/group name to the engine.
Reviewed-by: João Abecasis
Diffstat (limited to 'src/corelib/io/qfilesystemengine.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp index 56072d4..cbc4c42 100644 --- a/src/corelib/io/qfilesystemengine.cpp +++ b/src/corelib/io/qfilesystemengine.cpp @@ -287,4 +287,20 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer) #endif +//static +QString QFileSystemEngine::resolveUserName(const QFileSystemEntry &entry, QFileSystemMetaData &metaData) +{ + if (!metaData.hasFlags(QFileSystemMetaData::UserId)) + QFileSystemEngine::fillMetaData(entry, metaData, QFileSystemMetaData::UserId); + return resolveGroupName(metaData.userId()); +} + +//static +QString QFileSystemEngine::resolveGroupName(const QFileSystemEntry &entry, QFileSystemMetaData &metaData) +{ + if (!metaData.hasFlags(QFileSystemMetaData::GroupId)) + QFileSystemEngine::fillMetaData(entry, metaData, QFileSystemMetaData::GroupId); + return resolveGroupName(metaData.groupId()); +} + QT_END_NAMESPACE |