Closed Bug 1759768 Opened 3 years ago Closed 3 years ago

Change calUtils service getters into properties

Categories

(Calendar :: Internal Components, enhancement)

enhancement

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
100 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: darktrojan, Assigned: leftmostcat)

References

Details

Attachments

(1 file, 1 obsolete file)

The cal object has a bunch of methods for getting services. They're called like this: cal.getCalendarManager() or cal.getWeekInfoService() but having them as methods really isn't necessary, they could just be referenced as cal.manager or cal.weekInfoService.

To do this we should get rid of the _service function that implements the methods, and just call XPCOMUtils.defineLazyServiceGetter to add them to cal. Then go around and change all of the callers, which should be a simple find/replace operation.

(Later on, we can get rid of the interfaces calICalendarManager, calIFreeBusyService, and calIWeekInfoService altogether and just reference the objects straight from the modules. And nsIDragService doesn't really need to be here at all. But I think these are things for another bug.)

Assignee: nobody → leftmostcat

Depends on D141897

Comment on attachment 9269127 [details]
Bug 1759768 - remove misplaced Java modelines. r=#thunderbird-reviewers

Revision D141898 was moved to bug 1761129. Setting attachment 9269127 [details] to obsolete.

Attachment #9269127 - Attachment is obsolete: true

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/745eeaff881c
use standard lazy getters for cal services. r=darktrojan

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: