Bug 153076 - [GTK] Consistently use virtual and override specifiers in ScrollbarThemeGtk
Summary: [GTK] Consistently use virtual and override specifiers in ScrollbarThemeGtk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 13:04 PST by Michael Catanzaro
Modified: 2016-01-13 14:29 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.42 KB, patch)
2016-01-13 13:08 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2016-01-13 13:04:31 PST
Carlos made ScrollbarThemeGtk a final class, which I guess serves as an opt-in for new Clang warnings:

[4498/5928] Building CXX object Source...r/platform/gtk/ScrollbarThemeGtk.cpp.o
In file included from ../../Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:27:
../../Source/WebCore/platform/gtk/ScrollbarThemeGtk.h:63:10: warning: 'themeChanged' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    void themeChanged();
         ^
../../Source/WebCore/platform/ScrollbarTheme.h:63:18: note: overridden virtual function is here
    virtual void themeChanged() {}
                 ^
1 warning generated.
[4500/5928] Building CXX object Source...GTK.dir/rendering/RenderThemeGtk.cpp.o
In file included from ../../Source/WebCore/rendering/RenderThemeGtk.cpp:48:
../../Source/WebCore/platform/gtk/ScrollbarThemeGtk.h:63:10: warning: 'themeChanged' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    void themeChanged();
         ^
../../Source/WebCore/platform/ScrollbarTheme.h:63:18: note: overridden virtual function is here
    virtual void themeChanged() {}
                 ^
1 warning generated.

While we're at it... most of these functions have redundant virtual specifiers and override, while the rest have only override. I prefer to omit virtual when unneeded, and we don't currently have consistency within WebKit, but most of the other functions here use it, so let's do that.
Comment 1 Michael Catanzaro 2016-01-13 13:07:30 PST
(In reply to comment #0)
> Carlos made ScrollbarThemeGtk a final class, which I guess serves as an
> opt-in for new Clang warnings:

Nah, the problem is that none of the functions were previously marked override.
Comment 2 Michael Catanzaro 2016-01-13 13:08:04 PST
Created attachment 268896 [details]
Patch
Comment 3 WebKit Commit Bot 2016-01-13 14:29:15 PST
Comment on attachment 268896 [details]
Patch

Clearing flags on attachment: 268896

Committed r194984: <http://trac.webkit.org/changeset/194984>
Comment 4 WebKit Commit Bot 2016-01-13 14:29:18 PST
All reviewed patches have been landed.  Closing bug.