diff options
Diffstat (limited to 'src/corelib/io/qfsfileengine_unix.cpp')
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 16 |
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); } } |