Closed Bug 1279727 Opened 4 years ago Closed 4 years ago
Fix deprecated warning in ns
Emlx Helper Utils .mm
This patch will fix the following -Wdeprecated-declarations warning: /mailnews/import/applemail/src/nsEmlxHelperUtils.mm:35:43: warning: 'propertyListFromData:mutabilityOption:format:errorDescription:' is deprecated: first deprecated in OS X 10.10 - Use propertyListWithData:options:format:error: instead. [-Wdeprecated-declarations] id plist = [NSPropertyListSerialization propertyListFromData:metadata ^
Wayne, who are our OSX folks? I don't know anything about this .mm code, it would be good if we could get someone with some experience to look at it.
Perhaps Javi or Simon can help
Comment on attachment 8762312 [details] [diff] [review] Patch I will provide feedback in a few hours as I need to compile from scratch and via SSH. I am requesting feedback to myself to remember about it.
Attachment #8762312 - Flags: feedback?(leofigueres)
Comment on attachment 8762312 [details] [diff] [review] Patch When compiling with the patch, I get following warning: 2:22.86 Warning: -Wobjc-method-access in /Users/javierrueda/c-c/mailnews/import/applemail/src/nsEmlxHelperUtils.mm: class method '+propertyListWithData:mutabilityOption:format:errorDescription:' not found (return type defaults to 'id') 2:22.86 /Users/javierrueda/c-c/mailnews/import/applemail/src/nsEmlxHelperUtils.mm:34:43: warning: class method '+propertyListWithData:mutabilityOption:format:errorDescription:' not found (return type defaults to 'id') [-Wobjc-method-access] 2:22.86 id plist = [NSPropertyListSerialization propertyListWithData:metadata 2:22.86 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2:22.86 1 warning generated. I suggest changing |mutabilityOption| with |options| and |errorDescription| with |error| as declared https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSPropertyListSerialization_Class/index.html#//apple_ref/occ/clm/NSPropertyListSerialization/propertyListFromData:mutabilityOption:format:errorDescription: You will also need to change the |options| parameter. Please, check the correct one at the documentation linked above. If I am true, then there will be no warnings related to that portion of the code. Then, if you attach a new patch for this bug I could take another look into it and provide again feedback. Thank you for your patch, Nomis101.
Attachment #8762312 - Flags: feedback?(leofigueres) → feedback-
Thanks for testing and your suggestions. This now builds for me without any new warning.
Comment on attachment 8763280 [details] [diff] [review] Patch v2 Now it looks good. Some comment about this change. Old method was deprecated for OS X 10.10 (the one from 2014). New code is using a method which is available since OS X 10.6. As far as Thunderbird is requiring at least this exact version, this change should not cause any trouble to the release. Thank you for your patches, Nomis101. Now :rkent could review the code, if my explanation was ok.
Attachment #8763280 - Flags: feedback?(leofigueres) → feedback+
Comment on attachment 8763280 [details] [diff] [review] Patch v2 Review of attachment 8763280 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the feedback. This all makes sense to me. Thanks for working on this, Nomis101!
Attachment #8763280 - Flags: review+
https://hg.mozilla.org/comm-central/rev/0a57791823f5e60794cb19d657ca80be374aa559 Bug 1279727 - Fix deprecated warning in nsEmlxHelperUtils.mm. r=rkent
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 50.0
You need to log in before you can comment on or make changes to this bug.