Bug 54924

Summary: ImageDocument::imageChanged() confuses clang's -Woverride-virtual
Product: WebKit Reporter: Nico Weber <thakis>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 54367    
Attachments:
Description Flags
Patch none

Nico Weber
Reported 2011-02-21 18:53:07 PST
ImageDocument has a method called imageChanged(). It indirectly inherits from CachedResourceClient, which has a method of the same name. From what I can tell, the method in ImageDocument is not supposed to override the superclass's method. clang's -Woverride-virtual complains: third_party/WebKit/Source/WebCore/html/ImageDocument.h:46:10:error: 'WebCore::ImageDocument::imageChanged' hides overloaded virtual function [-Woverloaded-virtual] void imageChanged(); ^ In file included from third_party/WebKit/Source/WebCore/html/ImageDocument.cpp:26: In file included from third_party/WebKit/Source/WebCore/html/ImageDocument.h:28: In file included from third_party/WebKit/Source/WebCore/html/HTMLDocument.h:26: third_party/WebKit/Source/WebCore/loader/cache/CachedResourceClient.h:55:22: note: hidden overloaded virtual function 'WebCore::CachedResourceClient::imageChanged' declared here virtual void imageChanged(CachedImage*, const IntRect* = 0) { }; ^ One of the two methods should be renamed.
Attachments
Patch (2.45 KB, patch)
2011-02-21 19:04 PST, Nico Weber
no flags
Nico Weber
Comment 1 2011-02-21 19:04:34 PST
WebKit Commit Bot
Comment 2 2011-02-21 22:10:44 PST
Comment on attachment 83256 [details] Patch Clearing flags on attachment: 83256 Committed r79288: <http://trac.webkit.org/changeset/79288>
WebKit Commit Bot
Comment 3 2011-02-21 22:10:49 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.