summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemengine.cpp
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-09-10 13:15:43 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-09-10 13:15:43 (GMT)
commitcc23ac99d68af5c9bf537e5451b7ee7c7698e954 (patch)
treefe91ec2dd40894369ce0b76f9c74c2e140765486 /src/corelib/io/qfilesystemengine.cpp
parent69b8cf630e9cc83cd678814bf88495c7fbb438f4 (diff)
downloadQt-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.cpp16
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