Closed Bug 1279727 Opened 4 years ago Closed 4 years ago

Fix deprecated warning in


(MailNews Core :: Import, defect)

Not set


(Not tracked)

Thunderbird 50.0


(Reporter: Nomis101, Assigned: Nomis101)



(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
This patch will fix the following -Wdeprecated-declarations warning:

/mailnews/import/applemail/src/ warning: 
      'propertyListFromData:mutabilityOption:format:errorDescription:' is
      deprecated: first deprecated in OS X 10.10 - Use
      propertyListWithData:options:format:error: instead.
  id plist = [NSPropertyListSerialization propertyListFromData:metadata
Attachment #8762312 - Flags: review?(rkent)
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.
Flags: needinfo?(vseerror)
Perhaps Javi or Simon can help
Flags: needinfo?(vseerror)
Comment on attachment 8762312 [details] [diff] [review]

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]

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/ class method '+propertyListWithData:mutabilityOption:format:errorDescription:' not found (return type defaults to 'id')
 2:22.86 /Users/javierrueda/c-c/mailnews/import/applemail/src/ 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

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-
Attached patch Patch v2Splinter Review
Thanks for testing and your suggestions. This now builds for me without any new warning.
Attachment #8762312 - Attachment is obsolete: true
Attachment #8762312 - Flags: review?(rkent)
Attachment #8763280 - Flags: feedback?(leofigueres)
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+
Assignee: nobody → Nomis101
Keywords: checkin-needed
Bug 1279727 - Fix deprecated warning in r=rkent
Closed: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 50.0
You need to log in before you can comment on or make changes to this bug.