Fix leaks in OS X bundle detection
There were several leaked CFStringRefs in the new OS X bundle detection code that is part of QFileSystemEngine. Change-Id: Id0817e9692da411c7eb8287b9bf71b99ae28f960 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This commit is contained in:
parent
46d3c25980
commit
2b99491692
@ -83,13 +83,13 @@ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &e
|
||||
|
||||
if (suffix.length() > 0) {
|
||||
// First step: is the extension known ?
|
||||
CFStringRef extensionRef = QCFString::toCFStringRef(suffix);
|
||||
CFStringRef uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);
|
||||
QCFType<CFStringRef> extensionRef = QCFString::toCFStringRef(suffix);
|
||||
QCFType<CFStringRef> uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);
|
||||
if (UTTypeConformsTo(uniformTypeIdentifier, kUTTypeBundle))
|
||||
return true;
|
||||
|
||||
// Second step: check if an application knows the package type
|
||||
CFStringRef path = QCFString::toCFStringRef(entry.filePath());
|
||||
QCFType<CFStringRef> path = QCFString::toCFStringRef(entry.filePath());
|
||||
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle, true);
|
||||
|
||||
UInt32 type, creator;
|
||||
|
Loading…
x
Reference in New Issue
Block a user