summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-11-17 17:20:26 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-11-22 16:37:19 (GMT)
commit96acd93d741cd735f8c4bdaf6fdcf073192b1562 (patch)
tree180c43ba1d6b68001c16e6f57f1c06ecd2c24a4a /src
parentc5a5696ca5273fb0a8474b525d1df4a52463afbd (diff)
downloadQt-96acd93d741cd735f8c4bdaf6fdcf073192b1562.zip
Qt-96acd93d741cd735f8c4bdaf6fdcf073192b1562.tar.gz
Qt-96acd93d741cd735f8c4bdaf6fdcf073192b1562.tar.bz2
QFileSystemEngine: clean up unused code
resolveUser/GroupName(id) only make sense on Unix platforms, there's no point in replicating them elsewhere. bundleName is a Mac-only feature, so we can otherwise merge the default implementation for other platforms. Reviewed-by: Shane Kearns
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfilesystemengine_p.h9
-rw-r--r--src/corelib/io/qfilesystemengine_symbian.cpp21
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp6
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp19
4 files changed, 10 insertions, 45 deletions
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index 1f4aad0..63d2a91 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -69,11 +69,18 @@ public:
static QFileSystemEntry canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
static QFileSystemEntry absoluteName(const QFileSystemEntry &entry);
static QString resolveUserName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
- static QString resolveUserName(uint userId);
static QString resolveGroupName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
+
+#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+ static QString resolveUserName(uint userId);
static QString resolveGroupName(uint groupId);
+#endif
+#if !defined(QWS) && defined(Q_OS_MAC)
static QString bundleName(const QFileSystemEntry &entry);
+#else
+ static QString bundleName(const QFileSystemEntry &entry) { Q_UNUSED(entry) return QString(); }
+#endif
static bool fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
QFileSystemMetaData::MetaDataFlags what);
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp
index c4e8d36..3659a39 100644
--- a/src/corelib/io/qfilesystemengine_symbian.cpp
+++ b/src/corelib/io/qfilesystemengine_symbian.cpp
@@ -151,27 +151,6 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
return QFileSystemEntry(symbianCleanAbsolutePath(result), QFileSystemEntry::FromInternalPath());
}
-//static
-QString QFileSystemEngine::resolveUserName(uint userId)
-{
- Q_UNUSED(userId)
- return QString(); // no users or groups on symbian
-}
-
-//static
-QString QFileSystemEngine::resolveGroupName(uint groupId)
-{
- Q_UNUSED(groupId)
- return QString(); // no users or groups on symbian
-}
-
-//static
-QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
-{
- Q_UNUSED(entry);
- return QString();
-}
-
void QFileSystemMetaData::fillFromTEntry(const TEntry& entry)
{
entryFlags &= ~(QFileSystemMetaData::SymbianTEntryFlags);
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index dc6888d..329da08 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -333,10 +333,10 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
return QString();
}
+#if !defined(QWS) && defined(Q_OS_MAC)
//static
QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
{
-#if !defined(QWS) && defined(Q_OS_MAC)
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(entry.filePath()),
kCFURLPOSIXPathStyle, true);
if (QCFType<CFDictionaryRef> dict = CFBundleCopyInfoDictionaryForURL(url)) {
@@ -345,11 +345,9 @@ QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
return QCFString::toQString((CFStringRef)name);
}
}
-#else
- Q_UNUSED(entry);
-#endif
return QString();
}
+#endif
//static
bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 8fa4d62..b2afe90 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -529,25 +529,6 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
}
//static
-QString QFileSystemEngine::resolveUserName(uint userId)
-{
- return QString(); // TODO
-}
-
-//static
-QString QFileSystemEngine::resolveGroupName(uint groupId)
-{
- return QString(); // TODO
-}
-
-//static
-QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
-{
- Q_UNUSED(entry);
- return QString();
-}
-
-//static
QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own)
{
QString name;