Modify

Ticket #4863 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: Erik Hovland <erik@…> Owned by: ijr
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

libs_libmyth_managedlist-fix-getValue-inheritance-override.patch (945 bytes) - added by Erik Hovland <erik@…> 4 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

Change History

Changed 4 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 4 years ago by danielk

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.