From 79740fb9ba11c49469c52bce4ca3a4816843686f Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 13 Sep 2019 12:52:20 +0200 Subject: MacGui: fix a few warnings when building in Xcode 11. --- macosx/HBOutputPanelController.m | 5 +++-- macosx/HBPicture.m | 4 ++-- macosx/HBQueueItem.m | 4 ++-- macosx/HBRange.m | 6 ++---- macosx/HBTitle.m | 3 +-- macosx/HBVideo.m | 8 ++++---- macosx/HandBrake.xcodeproj/project.pbxproj | 6 +++++- .../xcschemes/HandBrake-Debug-Sandbox.xcscheme | 10 +++------ .../xcschemes/HandBrake-Debug.xcscheme | 24 +++++++++------------- .../xcschemes/HandBrake-Distribution.xcscheme | 10 +++------ .../xcschemes/HandBrake-Release-Sandbox.xcscheme | 24 +++++++++------------- .../xcschemes/HandBrake-Release.xcscheme | 24 +++++++++------------- 12 files changed, 55 insertions(+), 73 deletions(-) (limited to 'macosx') diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m index 3cfec6caa..7d9b8c66c 100644 --- a/macosx/HBOutputPanelController.m +++ b/macosx/HBOutputPanelController.m @@ -87,9 +87,11 @@ [super showWindow:sender]; } +/** + Write the HandBrake version number to the log + */ - (void)writeHeader { - // Lets report the HandBrake version number here to the activity log and text log file NSDictionary *infoDict = NSBundle.mainBundle.infoDictionary; NSString *versionStringFull = [NSString stringWithFormat:@"Handbrake Version: %@ (%@)", infoDict[@"CFBundleShortVersionString"], infoDict[@"CFBundleVersion"]]; [HBUtilities writeToActivityLog:"%s", versionStringFull.UTF8String]; @@ -140,7 +142,6 @@ */ - (IBAction)openActivityLogFile:(id)sender { - // Opens the activity window log file in the users default text editor [NSWorkspace.sharedWorkspace openURL:self.outputFile.url]; } diff --git a/macosx/HBPicture.m b/macosx/HBPicture.m index a623d9600..113a77142 100644 --- a/macosx/HBPicture.m +++ b/macosx/HBPicture.m @@ -571,7 +571,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; encodeInt(_height); encodeBool(_keepDisplayAspect); - encodeInt(_anamorphicMode); + encodeInteger(_anamorphicMode); encodeInt(_modulus); encodeInt(_displayWidth); @@ -603,7 +603,7 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; decodeInt(_height); if (_height < 0) { goto fail; } decodeBool(_keepDisplayAspect); - decodeInt(_anamorphicMode); + decodeInteger(_anamorphicMode); if (_anamorphicMode < HBPictureAnarmophicModeNone || _anamorphicMode > HBPictureAnarmophicModeAuto) { goto fail; diff --git a/macosx/HBQueueItem.m b/macosx/HBQueueItem.m index b8feb4b0e..6915d61dd 100644 --- a/macosx/HBQueueItem.m +++ b/macosx/HBQueueItem.m @@ -230,7 +230,7 @@ static NSString *versionKey = @"HBQueueItemVersion"; - (void)encodeWithCoder:(nonnull NSCoder *)coder { [coder encodeInt:1 forKey:versionKey]; - encodeInt(_state); + encodeInteger(_state); encodeObject(_job); encodeObject(_uuid); @@ -251,7 +251,7 @@ static NSString *versionKey = @"HBQueueItemVersion"; if (version == 1 && (self = [super init])) { - decodeInt(_state); if (_state < HBQueueItemStateReady || _state > HBQueueItemStateFailed) { goto fail; } + decodeInteger(_state); if (_state < HBQueueItemStateReady || _state > HBQueueItemStateFailed) { goto fail; } decodeObjectOrFail(_job, HBJob); decodeObjectOrFail(_uuid, NSString); diff --git a/macosx/HBRange.m b/macosx/HBRange.m index 5a8d9d27a..26b354395 100644 --- a/macosx/HBRange.m +++ b/macosx/HBRange.m @@ -12,8 +12,6 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification"; @implementation HBRange -#pragma mark - NSCoding - - (instancetype)initWithTitle:(HBTitle *)title { self = [super init]; @@ -193,7 +191,7 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification"; { [coder encodeInt:1 forKey:@"HBRangeVersion"]; - encodeInt(_type); + encodeInteger(_type); encodeInt(_chapterStart); encodeInt(_chapterStop); @@ -209,7 +207,7 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification"; { self = [super init]; - decodeInt(_type); if (_type < HBRangeTypeChapters || _type > HBRangePreviewIndex) { goto fail; } + decodeInteger(_type); if (_type < HBRangeTypeChapters || _type > HBRangePreviewIndex) { goto fail; } decodeInt(_chapterStart); if (_chapterStart < 0) { goto fail; } decodeInt(_chapterStop); if (_chapterStop < _chapterStart) { goto fail; } diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index 895ef6fe8..653b63b4c 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -128,9 +128,8 @@ fail: if (self) { _displayName = [displayName copy]; - _title = @""; _type = type; - _isoLanguageCode = @""; + _isoLanguageCode = @"und"; _fileURL = fileURL; } return self; diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m index c062759e0..cb4cca3b9 100644 --- a/macosx/HBVideo.m +++ b/macosx/HBVideo.m @@ -499,7 +499,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; encodeInt(_encoder); - encodeInt(_qualityType); + encodeInteger(_qualityType); encodeInt(_avgBitrate); encodeDouble(_quality); @@ -507,7 +507,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; encodeDouble(_qualityMaxValue); encodeInt(_frameRate); - encodeInt(_frameRateMode); + encodeInteger(_frameRateMode); encodeBool(_twoPass); encodeBool(_turboTwoPass); @@ -528,7 +528,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; decodeInt(_encoder); - decodeInt(_qualityType); if (_qualityType < HBVideoQualityTypeAvgBitrate || _qualityType > HBVideoQualityTypeConstantQuality) { goto fail; } + decodeInteger(_qualityType); if (_qualityType < HBVideoQualityTypeAvgBitrate || _qualityType > HBVideoQualityTypeConstantQuality) { goto fail; } decodeInt(_avgBitrate); if (_avgBitrate < 0) { goto fail; } decodeDouble(_quality); @@ -536,7 +536,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; decodeDouble(_qualityMaxValue); decodeInt(_frameRate); if (_frameRate < 0) { goto fail; } - decodeInt(_frameRateMode); if (_frameRateMode < HBVideoFrameRateModeVFR_PFR || _frameRateMode > HBVideoFrameRateModeCFR) { goto fail; } + decodeInteger(_frameRateMode); if (_frameRateMode < HBVideoFrameRateModeVFR_PFR || _frameRateMode > HBVideoFrameRateModeCFR) { goto fail; } decodeBool(_twoPass); decodeBool(_turboTwoPass); diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 2b30ed702..a09bf0a66 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -1710,7 +1710,7 @@ 273F1FE014AD9DA40021BE6D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1100; TargetAttributes = { 273F203814ADBC200021BE6D = { SystemCapabilities = { @@ -2655,6 +2655,7 @@ "\"$(EXTERNAL_BUILD)/libhb\"", "\"$(EXTERNAL_BUILD)/contrib/lib\"", ); + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -2687,6 +2688,7 @@ "\"$(EXTERNAL_BUILD)/libhb\"", "\"$(EXTERNAL_BUILD)/contrib/lib\"", ); + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -3473,6 +3475,7 @@ "\"$(EXTERNAL_BUILD)/libhb\"", "\"$(EXTERNAL_BUILD)/contrib/lib\"", ); + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -3723,6 +3726,7 @@ "\"$(EXTERNAL_BUILD)/libhb\"", "\"$(EXTERNAL_BUILD)/contrib/lib\"", ); + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrake; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Debug-Sandbox.xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Debug-Sandbox.xcscheme index de32f3600..162a366ea 100644 --- a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Debug-Sandbox.xcscheme +++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake-Debug-Sandbox.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - + + + + @@ -53,17 +62,6 @@ - - - - - - - - - - - - + + - - + + + + @@ -67,17 +76,6 @@ - - - - - - - - + + + + @@ -67,17 +76,6 @@ - - - - - - - -