Opened 12 years ago

Closed 12 years ago

#4863 closed defect (fixed)

ManagedListSetting::getValue() does not properly overrirde Setting::getValue()

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The signature for ManagedListSetting::getValue() does not match the signature of Setting::getValue(). So the inheritor does not properly override the inherited. This can cause weird problems where a user would think they are calling one member function but will be calling the other. In this case it means that the DB will not be in sync with the list when the value is returned.

Attachments (1)

libs_libmyth_managedlist-fix-getValue-inheritance-override.patch (945 bytes) - added by Erik Hovland <erik@…> 12 years ago.
fixes the signature of ManagedListSetting::getValue() so it matches Setting::getValue. Note that it includes a casting away of const. I did this instead of mutable (in the Setting class) because it takes a lot less code change to get the effect. If mutable is required, let me know

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by Erik Hovland <erik@…>

fixes the signature of ManagedListSetting::getValue() so it matches Setting::getValue. Note that it includes a casting away of const. I did this instead of mutable (in the Setting class) because it takes a lot less code change to get the effect. If mutable is required, let me know

comment:1 Changed 12 years ago by danielk

Resolution: fixed
Status: newclosed

(In [17205]) Fixes #4863. Fixes signature of ManagedListSetting::getValue()

Note: See TracTickets for help on using tickets.