]> granicus.if.org Git - transmission/commitdiff
convert the Quick Look plugin to ARC
authorMitchell Livingston <livings124@transmissionbt.com>
Thu, 6 Sep 2012 03:09:49 +0000 (03:09 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Thu, 6 Sep 2012 03:09:49 +0000 (03:09 +0000)
Transmission.xcodeproj/project.pbxproj
macosx/QuickLookPlugin/GeneratePreviewForURL.m

index 1c6677610388a3acdbdd77a3bc7b814a0ccedec1..e13910ec8ca518338d507a72a3cc5f77374f6c89 100644 (file)
                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 */; };
                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,
                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,
                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,
index c1c68b2a23293305f3e139607a34dffc82300a76..96585ad1f33ba0c2611de7c231d81309a8c53134 100644 (file)
@@ -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;
 }