From 85607d77b43db6e7371a14d4eedd8374ff1069d2 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 21 Apr 2017 13:47:20 +0200 Subject: [PATCH] MacGui: NSUUID is not available on 10.7, replace it with CFUUIDRef (cherry picked from commit bc092457f1409c7d014bbdd3fbd65db0340244bf) --- macosx/HBJob.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/macosx/HBJob.m b/macosx/HBJob.m index e3d608a9a..785ff9ca1 100644 --- a/macosx/HBJob.m +++ b/macosx/HBJob.m @@ -54,7 +54,10 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; _chapterTitles = [title.chapters copy]; - _uuid = [[NSUUID UUID] UUIDString]; + CFUUIDRef theUUID = CFUUIDCreate(NULL); + CFStringRef string = CFUUIDCreateString(NULL, theUUID); + CFRelease(theUUID); + _uuid = CFBridgingRelease(string); [self applyPreset:preset]; } @@ -204,7 +207,11 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; copy->_name = [_name copy]; copy->_presetName = [_presetName copy]; copy->_titleIdx = _titleIdx; - copy->_uuid = [[NSUUID UUID] UUIDString]; + + CFUUIDRef theUUID = CFUUIDCreate(NULL); + CFStringRef string = CFUUIDCreateString(NULL, theUUID); + CFRelease(theUUID); + copy->_uuid = CFBridgingRelease(string); copy->_fileURL = [_fileURL copy]; copy->_destURL = [_destURL copy]; -- 2.40.0