Changeset 13468


Ignore:
Timestamp:
Sep 6, 2012, 3:09:49 AM (10 years ago)
Author:
livings124
Message:

convert the Quick Look plugin to ARC

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r13467 r13468  
    287287                A2D77452154CC25700A62B93 /* WebSeedTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2D77450154CC25700A62B93 /* WebSeedTableView.m */; };
    288288                A2D77453154CC72B00A62B93 /* WebSeedTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2D77450154CC25700A62B93 /* WebSeedTableView.m */; };
    289                 A2D8CFBA15F82DFA0056E93D /* NSApplicationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A29D84031049C25600D1987A /* NSApplicationAdditions.m */; };
    290                 A2D8CFBB15F82E030056E93D /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DE5CC9C0980656F00BE280E /* NSStringAdditions.m */; };
     289                A2D8CFBA15F82DFA0056E93D /* NSApplicationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A29D84031049C25600D1987A /* NSApplicationAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
     290                A2D8CFBB15F82E030056E93D /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DE5CC9C0980656F00BE280E /* NSStringAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
    291291                A2DA362A0CBC674900C2ED41 /* InfoActivity.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36270CBC674900C2ED41 /* InfoActivity.png */; };
    292292                A2DA362B0CBC674900C2ED41 /* InfoFiles.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36280CBC674900C2ED41 /* InfoFiles.png */; };
     
    35963596                        isa = XCBuildConfiguration;
    35973597                        buildSettings = {
     3598                                CLANG_ENABLE_OBJC_ARC = YES;
    35983599                                GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch";
    35993600                                INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist";
    36003601                                INSTALL_PATH = /Library/QuickLook;
    3601                                 LIBRARY_SEARCH_PATHS = (
    3602                                         "$(inherited)",
    3603                                         "\"$(SRCROOT)/third-party/curl/lib\"",
    3604                                 );
     3602                                LIBRARY_SEARCH_PATHS = "$(inherited)";
     3603                                MACOSX_DEPLOYMENT_TARGET = 10.6.8;
    36053604                                OTHER_LDFLAGS = (
    36063605                                        "-read_only_relocs",
     
    36153614                        isa = XCBuildConfiguration;
    36163615                        buildSettings = {
     3616                                CLANG_ENABLE_OBJC_ARC = YES;
    36173617                                GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch";
    36183618                                INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist";
    36193619                                INSTALL_PATH = /Library/QuickLook;
    3620                                 LIBRARY_SEARCH_PATHS = (
    3621                                         "$(inherited)",
    3622                                         "\"$(SRCROOT)/third-party/curl/lib\"",
    3623                                 );
     3620                                LIBRARY_SEARCH_PATHS = "$(inherited)";
     3621                                MACOSX_DEPLOYMENT_TARGET = 10.6.8;
    36243622                                OTHER_LDFLAGS = (
    36253623                                        "-read_only_relocs",
     
    36343632                        isa = XCBuildConfiguration;
    36353633                        buildSettings = {
     3634                                CLANG_ENABLE_OBJC_ARC = YES;
    36363635                                GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch";
    36373636                                INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist";
    36383637                                INSTALL_PATH = /Library/QuickLook;
    3639                                 LIBRARY_SEARCH_PATHS = (
    3640                                         "$(inherited)",
    3641                                         "\"$(SRCROOT)/third-party/curl/lib\"",
    3642                                 );
     3638                                LIBRARY_SEARCH_PATHS = "$(inherited)";
     3639                                MACOSX_DEPLOYMENT_TARGET = 10.6.8;
    36433640                                OTHER_LDFLAGS = (
    36443641                                        "-read_only_relocs",
  • trunk/macosx/QuickLookPlugin/GeneratePreviewForURL.m

    r13467 r13468  
    2121       
    2222        NSData * iconData = [renderedIcon TIFFRepresentation];
    23         [renderedIcon release];
    2423       
    2524        NSDictionary * imgProps = @{
     
    4443    tr_info inf;
    4544    tr_ctor * ctor = tr_ctorNew(NULL);
    46     tr_ctorSetMetainfoFromFile(ctor, [[(NSURL *)url path] UTF8String]);
     45    tr_ctorSetMetainfoFromFile(ctor, [[(__bridge NSURL *)url path] UTF8String]);
    4746    const int err = tr_torrentParse(ctor, &inf);
    4847    tr_ctorFree(ctor);
     
    170169                                (NSString *)kQLPreviewPropertyAttachmentsKey : allImgProps };
    171170   
    172     QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)[htmlString dataUsingEncoding: NSUTF8StringEncoding], kUTTypeHTML, (CFDictionaryRef)props);
     171    QLPreviewRequestSetDataRepresentation(preview, (__bridge CFDataRef)[htmlString dataUsingEncoding: NSUTF8StringEncoding], kUTTypeHTML, (__bridge CFDictionaryRef)props);
    173172   
    174173    return noErr;
Note: See TracChangeset for help on using the changeset viewer.