vlc | branch: master | Felix Paul Kühne <[email protected]> | Sat Jun 1 15:38:36 2019 +0200| [1c8ad8f231b358d47945a6f88776ed9a53b3d93a] | committer: Felix Paul Kühne
macosx: remove occurances of unsafe_unretained > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c8ad8f231b358d47945a6f88776ed9a53b3d93a --- modules/gui/macosx/panels/VLCAudioEffectsWindowController.m | 8 ++++---- modules/gui/macosx/panels/VLCVideoEffectsWindowController.m | 6 ++---- modules/gui/macosx/preferences/prefs.m | 2 +- .../windows/convertandsave/VLCConvertAndSaveWindowController.m | 4 ++-- modules/gui/macosx/windows/video/VLCWindow.m | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m b/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m index b91069c471..7606b12569 100644 --- a/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m +++ b/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m @@ -497,7 +497,7 @@ [_textfieldPanel setCancelButtonString:_NS("Cancel")]; [_textfieldPanel setOkButtonString:_NS("Save")]; - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_textfieldPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSString *resultingText) { NSInteger currentProfileIndex = [_self currentProfileIndex]; @@ -552,7 +552,7 @@ [_popupPanel setCancelButtonString:_NS("Cancel")]; [_popupPanel setPopupButtonContent:[self nonDefaultProfileNames]]; - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_popupPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSInteger selectedIndex) { NSInteger currentProfileIndex = [_self currentProfileIndex]; @@ -798,7 +798,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, [_textfieldPanel setCancelButtonString:_NS("Cancel")]; [_textfieldPanel setOkButtonString:_NS("Save")]; - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_textfieldPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSString *resultingText) { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; @@ -842,7 +842,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, [_popupPanel setCancelButtonString:_NS("Cancel")]; [_popupPanel setPopupButtonContent:[[NSUserDefaults standardUserDefaults] objectForKey:@"EQTitles"]]; - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_popupPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSInteger selectedIndex) { if (returnCode != NSModalResponseOK) diff --git a/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m b/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m index 39a0c1efac..b4d3ef7d82 100644 --- a/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m +++ b/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m @@ -783,8 +783,7 @@ [_textfieldPanel setCancelButtonString:_NS("Cancel")]; [_textfieldPanel setOkButtonString:_NS("Save")]; - // TODO: Change to weak, when dropping 10.7 support - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_textfieldPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSString *resultingText) { NSInteger currentProfileIndex = [_self currentProfileIndex]; @@ -842,8 +841,7 @@ [_popupPanel setCancelButtonString:_NS("Cancel")]; [_popupPanel setPopupButtonContent:[self nonDefaultProfileNames]]; - // TODO: Change to weak, when dropping 10.7 support - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_popupPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSInteger selectedIndex) { diff --git a/modules/gui/macosx/preferences/prefs.m b/modules/gui/macosx/preferences/prefs.m index f62a3bc02c..f74afc9752 100644 --- a/modules/gui/macosx/preferences/prefs.m +++ b/modules/gui/macosx/preferences/prefs.m @@ -86,7 +86,7 @@ NSMutableArray *_options; NSMutableArray *_subviews; } -@property (readwrite, unsafe_unretained) VLCPrefs *prefsViewController; +@property (readwrite, weak) VLCPrefs *prefsViewController; - (id)initWithName:(NSString*)name; diff --git a/modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m b/modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m index 1cf8bf93f1..8c409eafdc 100644 --- a/modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m +++ b/modules/gui/macosx/windows/convertandsave/VLCConvertAndSaveWindowController.m @@ -333,7 +333,7 @@ [_popupPanel setCancelButtonString:_NS("Cancel")]; [_popupPanel setPopupButtonContent:self.profileNames]; - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_popupPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSInteger selectedIndex) { if (returnCode != NSModalResponseOK) @@ -480,7 +480,7 @@ [_textfieldPanel setCancelButtonString: _NS("Cancel")]; [_textfieldPanel setOkButtonString: _NS("Save")]; - __unsafe_unretained typeof(self) _self = self; + __weak typeof(self) _self = self; [_textfieldPanel runModalForWindow:_customizePanel completionHandler:^(NSInteger returnCode, NSString *resultingText) { if (returnCode != NSModalResponseOK || [resultingText length] == 0) return; diff --git a/modules/gui/macosx/windows/video/VLCWindow.m b/modules/gui/macosx/windows/video/VLCWindow.m index 569e586493..1e4a29d61c 100644 --- a/modules/gui/macosx/windows/video/VLCWindow.m +++ b/modules/gui/macosx/windows/video/VLCWindow.m @@ -94,7 +94,7 @@ // Animate window alpha value [self setAlphaValue:1.0]; - __unsafe_unretained typeof(self) this = self; + __weak typeof(self) this = self; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ [[NSAnimationContext currentContext] setDuration:0.9]; [[this animator] setAlphaValue:0.0]; @@ -114,7 +114,7 @@ [super orderOut:self]; return; } - __unsafe_unretained typeof(self) this = self; + __weak typeof(self) this = self; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ [[NSAnimationContext currentContext] setDuration:0.5]; [[this animator] setAlphaValue:0.0]; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
