Bug 54976 - Incorrect switch-case fall-through inside InspectorClientQt.cpp
Summary: Incorrect switch-case fall-through inside InspectorClientQt.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-22 11:28 PST by Fabrizio
Modified: 2011-02-28 14:04 PST (History)
3 users (show)

See Also:


Attachments
Don't fall through case in variantToSetting() if qvariant.type() is Bool (1.20 KB, patch)
2011-02-22 11:34 PST, Fabrizio
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>