Bug 54976

Summary: Incorrect switch-case fall-through inside InspectorClientQt.cpp
Product: WebKit Reporter: Fabrizio <fabrizio.machado>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Trivial CC: ademar, commit-queue, suresh.voruganti
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Don't fall through case in variantToSetting() if qvariant.type() is Bool none

Description Fabrizio 2011-02-22 11:28:39 PST
In function variantToSetting(), code falls through to next case if qvariant.type() is QVariant::Bool.

This does not make sense since the QVariant::Bool case sets QString retval to "true" or "false".

Falling through and executing the block under QVariant::String case would overwrite this value.  The correct behavior is to break from the switch.
Comment 1 Fabrizio 2011-02-22 11:34:39 PST
Created attachment 83353 [details]
Don't fall through case in variantToSetting() if qvariant.type() is Bool
Comment 2 Laszlo Gombos 2011-02-22 16:57:38 PST
Comment on attachment 83353 [details]
Don't fall through case in variantToSetting() if qvariant.type() is Bool

r=me.
Comment 3 WebKit Commit Bot 2011-02-22 23:14:10 PST
Comment on attachment 83353 [details]
Don't fall through case in variantToSetting() if qvariant.type() is Bool

Clearing flags on attachment: 83353

Committed r79412: <http://trac.webkit.org/changeset/79412>
Comment 4 WebKit Commit Bot 2011-02-22 23:14:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Suresh Voruganti 2011-02-28 07:48:30 PST
Please cherry pick the fixes to Qtwebkit 2.1.x
Comment 6 Ademar Reis 2011-02-28 14:04:02 PST
Revision r79412 cherry-picked into qtwebkit-2.1.x with commit 677fa11 <http://gitorious.org/webkit/qtwebkit/commit/677fa11>