Revision: 28569
http://sourceforge.net/p/bibdesk/svn/28569
Author: hofman
Date: 2024-01-07 16:37:53 +0000 (Sun, 07 Jan 2024)
Log Message:
-----------
add CFBridgingRelease for LS objects
Modified Paths:
--------------
trunk/bibdesk/NSWorkspace_BDSKExtensions.m
Modified: trunk/bibdesk/NSWorkspace_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSWorkspace_BDSKExtensions.m 2024-01-07 10:09:36 UTC (rev
28568)
+++ trunk/bibdesk/NSWorkspace_BDSKExtensions.m 2024-01-07 16:37:53 UTC (rev
28569)
@@ -186,13 +186,12 @@
{
NSParameterAssert(aURL);
- NSArray *applications = (NSArray *)LSCopyApplicationURLsForURL((__bridge
CFURLRef)aURL, kLSRolesEditor | kLSRolesViewer);
+ NSArray *applications =
CFBridgingRelease(LSCopyApplicationURLsForURL((__bridge CFURLRef)aURL,
kLSRolesEditor | kLSRolesViewer));
if(nil != applications){
// LS seems to return duplicates (same full path), so we'll remove
those to avoid confusion
NSSet *uniqueApplications = [[NSSet alloc] initWithArray:applications];
- [applications release];
-
+
// sort by application name
NSSortDescriptor *sort = [[NSSortDescriptor alloc]
initWithKey:@"path.lastPathComponent.stringByDeletingPathExtension"
ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
applications = [[uniqueApplications allObjects]
sortedArrayUsingDescriptors:@[sort]];
@@ -207,7 +206,7 @@
{
NSParameterAssert(fileType);
- NSArray *bundleIDs = (NSArray
*)LSCopyAllRoleHandlersForContentType((__bridge CFStringRef)fileType,
kLSRolesEditor | kLSRolesViewer);
+ NSArray *bundleIDs =
CFBridgingRelease(LSCopyAllRoleHandlersForContentType((__bridge
CFStringRef)fileType, kLSRolesEditor | kLSRolesViewer));
NSMutableSet *set = [[NSMutableSet alloc] init];
NSMutableArray *applications = [NSMutableArray array];
@@ -226,7 +225,6 @@
[set addObject:bundleID];
}
[set release];
- BDSKDESTROY(bundleIDs);
// sort by application name
NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"name"
ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
@@ -262,7 +260,7 @@
- (void)emailTo:(NSString *)receiver subject:(NSString *)subject
body:(NSString *)body attachments:(NSArray *)files {
NSMutableString *scriptString = nil;
- NSString *mailAppID = [(NSString
*)LSCopyDefaultHandlerForURLScheme(CFSTR("mailto")) autorelease];
+ NSString *mailAppID =
CFBridgingRelease(LSCopyDefaultHandlerForURLScheme(CFSTR("mailto")));
subject = [subject stringByBackslashEscapingDoubleQuotes];
body = [body stringByBackslashEscapingDoubleQuotes];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit