]> 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:51:52 +0000 (13:51 +0200)
(cherry picked from commit bc092457f1409c7d014bbdd3fbd65db0340244bf)

macosx/HBJob.m

index e3d608a9ac5e8b006c2c704694aead261e4c01f9..785ff9ca17f2d62be2aa60183cabfca50528209b 100644 (file)
@@ -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];