getColorPref should not return success if the suplied value is not valid

RESOLVED FIXED

Status

RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: torben, Assigned: torben)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
The function getColorPref in PreferenceManager.mm and PreferencePaneBase.mm
returns success even if the supplied value is not a valid colorstring. It should
fail both if it can't get the pref and when the pref has an invalid value. See
bug  286516 for an example.
(Assignee)

Comment 1

14 years ago
getColorPref now returns false if the value is missing, not a string, or an
invalid value. Tested together with the patch for bug 286516.
Assignee: pinkerton → torben
Status: NEW → ASSIGNED
Attachment #178140 - Flags: review?

Comment 2

14 years ago
I checked in the patch. Thanks!
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Shouldn't returnColor just be set to nil on failure? This is what Apple's
methods do.
Comment on attachment 178140 [details] [diff] [review]
Make getColorPref tell if it gets an invalid value

Clearing the review flag since smfr checked this in last month :-)
Attachment #178140 - Flags: review?
You need to log in before you can comment on or make changes to this bug.