From 832dc127a4c81ce1fe79bc0c44415317ea9ae295 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 22 Aug 2020 14:02:41 +0300 Subject: [PATCH] Fix Quick Look preview on Big Sur --- QuickLook/generator.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QuickLook/generator.m b/QuickLook/generator.m index 1b2de66..92bb6ac 100644 --- a/QuickLook/generator.m +++ b/QuickLook/generator.m @@ -105,8 +105,9 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize) { + extern NSString *kQLThumbnailPropertyIconFlavorKey; @autoreleasepool { - CGContextRef cgContext = QLThumbnailRequestCreateContext(thumbnail, ((NSSize){1024, 1024}), true, (__bridge CFDictionaryRef)(@{@"IconFlavor" : @(0)})); + CGContextRef cgContext = QLThumbnailRequestCreateContext(thumbnail, ((NSSize){1024, 1024}), true, (__bridge CFDictionaryRef)(@{kQLThumbnailPropertyIconFlavorKey : @(0)})); if (render(cgContext, url, true) == noErr) { QLThumbnailRequestFlushContext(thumbnail, cgContext); CGContextRelease(cgContext);