summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_unix.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-21 13:38:04 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-21 13:38:04 (GMT)
commit4cc604be3fe96169c1dfdc05ff1b1a37e150e265 (patch)
tree6f751c3321c9e75fc6ce174024545614062498a2 /src/corelib/io/qfsfileengine_unix.cpp
parenta022a65ca9f4c073c9490eb3d0831fa9d954c3e5 (diff)
parent3513c1a01b319fb5fd4057be306c9f9506f8223d (diff)
downloadQt-4cc604be3fe96169c1dfdc05ff1b1a37e150e265.zip
Qt-4cc604be3fe96169c1dfdc05ff1b1a37e150e265.tar.gz
Qt-4cc604be3fe96169c1dfdc05ff1b1a37e150e265.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/corelib/io/qfsfileengine_unix.cpp')
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 96ea96e..2ca0ec9 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -514,21 +514,21 @@ QString QFSFileEngine::homePath()
QString QFSFileEngine::rootPath()
{
- return QString::fromLatin1("/");
+ return QLatin1String("/");
}
QString QFSFileEngine::tempPath()
{
QString temp = QFile::decodeName(qgetenv("TMPDIR"));
if (temp.isEmpty())
- temp = QString::fromLatin1("/tmp/");
+ temp = QLatin1String("/tmp/");
return temp;
}
QFileInfoList QFSFileEngine::drives()
{
QFileInfoList ret;
- ret.append(rootPath());
+ ret.append(QFileInfo(rootPath()));
return ret;
}
@@ -652,11 +652,11 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const
else if (exists && (d->st.st_mode & S_IFMT) == S_IFDIR)
ret |= DirectoryType;
#if !defined(QWS) && defined(Q_OS_MAC)
- if((ret & DirectoryType) && (type & BundleType)) {
+ if ((ret & DirectoryType) && (type & BundleType)) {
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath),
kCFURLPOSIXPathStyle, true);
UInt32 type, creator;
- if(CFBundleGetPackageInfoInDirectory(url, &type, &creator))
+ if (CFBundleGetPackageInfoInDirectory(url, &type, &creator))
ret |= BundleType;
}
#endif
@@ -690,9 +690,9 @@ QString QFSFileEngine::fileName(FileName file) const
#if !defined(QWS) && defined(Q_OS_MAC)
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath),
kCFURLPOSIXPathStyle, true);
- if(CFDictionaryRef dict = CFBundleCopyInfoDictionaryForURL(url)) {
- if(CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {
- if(CFGetTypeID(name) == CFStringGetTypeID())
+ if (CFDictionaryRef dict = CFBundleCopyInfoDictionaryForURL(url)) {
+ if (CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {
+ if (CFGetTypeID(name) == CFStringGetTypeID())
return QCFString::toQString((CFStringRef)name);
}
}