mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
convert the Quick Look plugin to ARC
This commit is contained in:
@@ -286,8 +286,8 @@
|
||||
A2D77451154CC25700A62B93 /* WebSeedTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D7744F154CC25700A62B93 /* WebSeedTableView.h */; };
|
||||
A2D77452154CC25700A62B93 /* WebSeedTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2D77450154CC25700A62B93 /* WebSeedTableView.m */; };
|
||||
A2D77453154CC72B00A62B93 /* WebSeedTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2D77450154CC25700A62B93 /* WebSeedTableView.m */; };
|
||||
A2D8CFBA15F82DFA0056E93D /* NSApplicationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A29D84031049C25600D1987A /* NSApplicationAdditions.m */; };
|
||||
A2D8CFBB15F82E030056E93D /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DE5CC9C0980656F00BE280E /* NSStringAdditions.m */; };
|
||||
A2D8CFBA15F82DFA0056E93D /* NSApplicationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A29D84031049C25600D1987A /* NSApplicationAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
A2D8CFBB15F82E030056E93D /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DE5CC9C0980656F00BE280E /* NSStringAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
A2DA362A0CBC674900C2ED41 /* InfoActivity.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36270CBC674900C2ED41 /* InfoActivity.png */; };
|
||||
A2DA362B0CBC674900C2ED41 /* InfoFiles.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36280CBC674900C2ED41 /* InfoFiles.png */; };
|
||||
A2DA362C0CBC674900C2ED41 /* InfoPeers.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36290CBC674900C2ED41 /* InfoPeers.png */; };
|
||||
@@ -3595,13 +3595,12 @@
|
||||
A2F35BD115C5A0A100EBF632 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist";
|
||||
INSTALL_PATH = /Library/QuickLook;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/third-party/curl/lib\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6.8;
|
||||
OTHER_LDFLAGS = (
|
||||
"-read_only_relocs",
|
||||
suppress,
|
||||
@@ -3614,13 +3613,12 @@
|
||||
A2F35BD215C5A0A100EBF632 /* Release - Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist";
|
||||
INSTALL_PATH = /Library/QuickLook;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/third-party/curl/lib\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6.8;
|
||||
OTHER_LDFLAGS = (
|
||||
"-read_only_relocs",
|
||||
suppress,
|
||||
@@ -3633,13 +3631,12 @@
|
||||
A2F35BD315C5A0A100EBF632 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist";
|
||||
INSTALL_PATH = /Library/QuickLook;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/third-party/curl/lib\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6.8;
|
||||
OTHER_LDFLAGS = (
|
||||
"-read_only_relocs",
|
||||
suppress,
|
||||
|
||||
@@ -20,7 +20,6 @@ NSString * generateIconData(NSString * fileExtension, NSUInteger width, NSMutabl
|
||||
[renderedIcon unlockFocus];
|
||||
|
||||
NSData * iconData = [renderedIcon TIFFRepresentation];
|
||||
[renderedIcon release];
|
||||
|
||||
NSDictionary * imgProps = @{
|
||||
(NSString *)kQLPreviewPropertyMIMETypeKey : @"image/png",
|
||||
@@ -43,7 +42,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
|
||||
//try to parse the torrent file
|
||||
tr_info inf;
|
||||
tr_ctor * ctor = tr_ctorNew(NULL);
|
||||
tr_ctorSetMetainfoFromFile(ctor, [[(NSURL *)url path] UTF8String]);
|
||||
tr_ctorSetMetainfoFromFile(ctor, [[(__bridge NSURL *)url path] UTF8String]);
|
||||
const int err = tr_torrentParse(ctor, &inf);
|
||||
tr_ctorFree(ctor);
|
||||
if (err)
|
||||
@@ -169,7 +168,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
|
||||
(NSString *)kQLPreviewPropertyMIMETypeKey : @"text/html",
|
||||
(NSString *)kQLPreviewPropertyAttachmentsKey : allImgProps };
|
||||
|
||||
QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)[htmlString dataUsingEncoding: NSUTF8StringEncoding], kUTTypeHTML, (CFDictionaryRef)props);
|
||||
QLPreviewRequestSetDataRepresentation(preview, (__bridge CFDataRef)[htmlString dataUsingEncoding: NSUTF8StringEncoding], kUTTypeHTML, (__bridge CFDictionaryRef)props);
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user