]> granicus.if.org Git - handbrake/commitdiff
MacGui: NSUUID is not available on 10.7, replace it with CFUUIDRef
authorDamiano Galassi <damiog@gmail.com>
Fri, 21 Apr 2017 11:47:20 +0000 (13:47 +0200)
committerDamiano Galassi <damiog@gmail.com>
Fri, 21 Apr 2017 11:50:48 +0000 (13:50 +0200)
macosx/HBJob.m

index 5631c90063ee52ff1d99bd3abf848ed10dcaabff..15f77ede20346abba97be87f0943c1a3b6d50216 100644 (file)
@@ -72,7 +72,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];
     }
@@ -271,7 +274,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->_fileURLBookmark = [_fileURLBookmark copy];
         copy->_outputURLFolderBookmark = [_outputURLFolderBookmark copy];