<table><tr><td style="">zzag created this revision.<br />zzag added a reviewer: KWin.<br />Herald added a project: KWin.<br />Herald added a subscriber: kwin.<br />zzag requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D22371">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Currently code base of kwin can be viewed as two pieces. One is very<br />
ancient, and the other one is more modern, which uses new C++ features.</p>

<p>The main problem with the ancient code is that it was written before<br />
C++11 era. So, no override or final keywords, lambdas, etc.</p>

<p>Quite recently, KDE compiler settings were changed to show a warning if<br />
a virtual method has missing override keyword. As you might have already<br />
guessed, this fired back at us because of that ancient code. We had<br />
about 500 new compiler warnings.</p>

<p>A "solution" was proposed to that problem - disable -Wno-suggest-override<br />
and the other similar warning for clang. It's hard to call a solution<br />
because those warnings are disabled not only for the old code, but also<br />
for new. This is not what we want!</p>

<p>The main argument for not actually fixing the problem was that git<br />
history will be screwed as well because of human factor. While good git<br />
history is a very important thing, we should not go crazy about it and<br />
block every change that somehow alters git history. git blame allows to<br />
specify starting revision for a reason.</p>

<p>The other argument (human factor) can be easily solved by using tools<br />
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can<br />
be used for various things, e.g. fixing coding styles(e.g. add missing<br />
braces to if statements, readability-braces-around-statements check),<br />
or in our case add missing override keywords.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Compiles.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>override</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D22371">https://phabricator.kde.org/D22371</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
abstract_client.h<br />
abstract_wayland_output.h<br />
activities.h<br />
autotests/fakeeffectplugin.cpp<br />
autotests/fakeeffectplugin_version.cpp<br />
autotests/integration/debug_console_test.cpp<br />
autotests/integration/helper/copy.cpp<br />
autotests/integration/helper/paste.cpp<br />
autotests/integration/internal_window.cpp<br />
autotests/integration/kwin_wayland_test.h<br />
autotests/integration/lockscreen.cpp<br />
autotests/integration/modifier_only_shortcut_test.cpp<br />
autotests/integration/no_global_shortcuts_test.cpp<br />
autotests/integration/plasmawindow_test.cpp<br />
autotests/integration/pointer_input.cpp<br />
autotests/mock_abstract_client.h<br />
autotests/mock_client.h<br />
autotests/mock_effectshandler.h<br />
autotests/mock_screens.h<br />
autotests/mock_workspace.h<br />
autotests/tabbox/mock_tabboxclient.h<br />
autotests/tabbox/mock_tabboxhandler.h<br />
autotests/test_virtualkeyboard_dbus.cpp<br />
autotests/test_x11_timestamp_update.cpp<br />
client.h<br />
client_machine.h<br />
colorcorrection/colorcorrectdbusinterface.h<br />
cursor.h<br />
dbusinterface.h<br />
debug_console.h<br />
decorations/decoratedclient.h<br />
decorations/decorationbridge.h<br />
decorations/decorationrenderer.h<br />
decorations/settings.h<br />
deleted.h<br />
effectloader.h<br />
effects.h<br />
effects/blur/blur_config.h<br />
effects/colorpicker/colorpicker.h<br />
effects/coverswitch/coverswitch.h<br />
effects/coverswitch/coverswitch_config.h<br />
effects/cube/cube.h<br />
effects/cube/cube_config.h<br />
effects/cube/cube_inside.h<br />
effects/cubeslide/cubeslide.h<br />
effects/cubeslide/cubeslide_config.h<br />
effects/desktopgrid/desktopgrid.h<br />
effects/desktopgrid/desktopgrid_config.h<br />
effects/fallapart/fallapart.h<br />
effects/flipswitch/flipswitch.h<br />
effects/flipswitch/flipswitch_config.h<br />
effects/highlightwindow/highlightwindow.h<br />
effects/invert/invert.h<br />
effects/invert/invert_config.h<br />
effects/kscreen/kscreen.h<br />
effects/lookingglass/lookingglass.h<br />
effects/lookingglass/lookingglass_config.h<br />
effects/magiclamp/magiclamp.h<br />
effects/magiclamp/magiclamp_config.h<br />
effects/magnifier/magnifier.h<br />
effects/magnifier/magnifier_config.h<br />
effects/mouseclick/mouseclick.h<br />
effects/mouseclick/mouseclick_config.h<br />
effects/mousemark/mousemark.h<br />
effects/mousemark/mousemark_config.h<br />
effects/presentwindows/presentwindows.h<br />
effects/presentwindows/presentwindows_config.h<br />
effects/resize/resize.h<br />
effects/resize/resize_config.h<br />
effects/screenedge/screenedgeeffect.h<br />
effects/showfps/showfps.h<br />
effects/showfps/showfps_config.h<br />
effects/slide/slide_config.h<br />
effects/slideback/slideback.h<br />
effects/startupfeedback/startupfeedback.h<br />
effects/thumbnailaside/thumbnailaside.h<br />
effects/thumbnailaside/thumbnailaside_config.h<br />
effects/touchpoints/touchpoints.h<br />
effects/trackmouse/trackmouse.h<br />
effects/trackmouse/trackmouse_config.h<br />
effects/windowgeometry/windowgeometry.h<br />
effects/windowgeometry/windowgeometry_config.h<br />
effects/wobblywindows/wobblywindows.h<br />
effects/wobblywindows/wobblywindows_config.h<br />
effects/zoom/zoom.h<br />
effects/zoom/zoom_config.h<br />
focuschain.h<br />
geometrytip.h<br />
globalshortcuts.h<br />
idle_inhibition.h<br />
input.h<br />
kcmkwin/kwincompositing/compositing.h<br />
kcmkwin/kwindecoration/declarative-plugin/buttonsmodel.h<br />
kcmkwin/kwindecoration/declarative-plugin/previewbridge.h<br />
kcmkwin/kwindecoration/declarative-plugin/previewbutton.h<br />
kcmkwin/kwindecoration/declarative-plugin/previewclient.h<br />
kcmkwin/kwindecoration/declarative-plugin/previewitem.h<br />
kcmkwin/kwindecoration/declarative-plugin/previewsettings.h<br />
kcmkwin/kwindecoration/decorationmodel.h<br />
kcmkwin/kwinoptions/main.h<br />
kcmkwin/kwinoptions/mouse.h<br />
kcmkwin/kwinoptions/windows.h<br />
kcmkwin/kwinrules/kcm.h<br />
kcmkwin/kwinrules/ruleslist.h<br />
kcmkwin/kwinrules/ruleswidget.h<br />
kcmkwin/kwinscreenedges/main.h<br />
kcmkwin/kwinscreenedges/monitor.h<br />
kcmkwin/kwinscreenedges/screenpreviewwidget.h<br />
kcmkwin/kwinscreenedges/touch.h<br />
kcmkwin/kwinscripts/module.h<br />
kcmkwin/kwintabbox/layoutpreview.h<br />
kcmkwin/kwintabbox/main.h<br />
kcmkwin/kwintabbox/thumbnailitem.h<br />
keyboard_input.h<br />
keyboard_layout_switching.h<br />
libinput/connection.cpp<br />
libinput/connection.h<br />
libinput/device.h<br />
libinput/events.h<br />
libkwineffects/kwinanimationeffect.h<br />
libkwineffects/kwineffects.h<br />
logind.h<br />
main.h<br />
main_wayland.h<br />
main_x11.h<br />
netinfo.h<br />
options.h<br />
orientation_sensor.h<br />
outline.h<br />
outputscreens.h<br />
platform.h<br />
platformsupport/scenes/opengl/abstract_egl_backend.h<br />
plugins/idletime/poller.h<br />
plugins/kdecorations/aurorae/src/aurorae.h<br />
plugins/kdecorations/aurorae/src/colorhelper.h<br />
plugins/kdecorations/aurorae/src/decorationoptions.h<br />
plugins/kdecorations/aurorae/src/decorationplugin.h<br />
plugins/kdecorations/aurorae/src/lib/auroraetheme.h<br />
plugins/kdecorations/aurorae/themes/plastik/code/plastikbutton.h<br />
plugins/kdecorations/aurorae/themes/plastik/code/plastikplugin.h<br />
plugins/kglobalaccel/kglobalaccel_plugin.h<br />
plugins/platforms/drm/drm_backend.h<br />
plugins/platforms/drm/drm_buffer.h<br />
plugins/platforms/drm/drm_buffer_gbm.h<br />
plugins/platforms/drm/drm_inputeventfilter.h<br />
plugins/platforms/drm/drm_object_connector.h<br />
plugins/platforms/drm/drm_object_crtc.h<br />
plugins/platforms/drm/drm_object_plane.h<br />
plugins/platforms/drm/egl_gbm_backend.h<br />
plugins/platforms/drm/egl_stream_backend.h<br />
plugins/platforms/drm/remoteaccess_manager.h<br />
plugins/platforms/drm/scene_qpainter_drm_backend.h<br />
plugins/platforms/drm/screens_drm.h<br />
plugins/platforms/fbdev/fb_backend.h<br />
plugins/platforms/fbdev/scene_qpainter_fb_backend.h<br />
plugins/platforms/virtual/egl_gbm_backend.h<br />
plugins/platforms/virtual/scene_qpainter_virtual_backend.h<br />
plugins/platforms/virtual/screens_virtual.h<br />
plugins/platforms/virtual/virtual_backend.h<br />
plugins/platforms/virtual/virtual_output.h<br />
plugins/platforms/wayland/egl_wayland_backend.h<br />
plugins/platforms/wayland/scene_qpainter_wayland_backend.h<br />
plugins/platforms/wayland/wayland_backend.h<br />
plugins/platforms/wayland/wayland_output.h<br />
plugins/platforms/x11/common/eglonxbackend.h<br />
plugins/platforms/x11/standalone/edge.h<br />
plugins/platforms/x11/standalone/glxbackend.h<br />
plugins/platforms/x11/standalone/non_composited_outline.h<br />
plugins/platforms/x11/standalone/overlaywindow_x11.h<br />
plugins/platforms/x11/standalone/screens_xrandr.h<br />
plugins/platforms/x11/standalone/windowselector.h<br />
plugins/platforms/x11/standalone/x11_decoration_renderer.h<br />
plugins/platforms/x11/standalone/x11_output.h<br />
plugins/platforms/x11/standalone/x11_platform.h<br />
plugins/platforms/x11/standalone/x11cursor.h<br />
plugins/platforms/x11/standalone/xinputintegration.cpp<br />
plugins/platforms/x11/standalone/xinputintegration.h<br />
plugins/platforms/x11/windowed/egl_x11_backend.h<br />
plugins/platforms/x11/windowed/scene_qpainter_x11_backend.h<br />
plugins/platforms/x11/windowed/x11windowed_backend.h<br />
plugins/qpa/abstractplatformcontext.h<br />
plugins/qpa/backingstore.h<br />
plugins/qpa/integration.h<br />
plugins/qpa/platformcursor.h<br />
plugins/qpa/screen.h<br />
plugins/qpa/window.h<br />
plugins/scenes/opengl/lanczosfilter.h<br />
plugins/scenes/opengl/scene_opengl.h<br />
plugins/scenes/qpainter/scene_qpainter.h<br />
plugins/scenes/xrender/scene_xrender.h<br />
pointer_input.h<br />
rules.h<br />
scene.h<br />
screenedge.h<br />
screenlockerwatcher.h<br />
screens.h<br />
scripting/dbuscall.h<br />
scripting/genericscriptedconfig.h<br />
scripting/screenedgeitem.h<br />
scripting/scriptedeffect.h<br />
scripting/scripting.h<br />
scripting/scripting_model.h<br />
shadow.h<br />
shell_client.h<br />
sm.h<br />
tabbox/clientmodel.h<br />
tabbox/desktopchain.h<br />
tabbox/desktopmodel.h<br />
tabbox/switcheritem.h<br />
tabbox/tabbox.h<br />
tabbox/tabboxhandler.h<br />
tabletmodemanager.h<br />
tests/cursorhotspottest.cpp<br />
tests/pointergesturestest.cpp<br />
tests/screenedgeshowtest.cpp<br />
tests/waylandclienttest.h<br />
thumbnailitem.h<br />
toplevel.h<br />
touch_input.h<br />
unmanaged.h<br />
useractions.h<br />
utils.h<br />
virtual_terminal.h<br />
virtualdesktops.h<br />
virtualkeyboard.h<br />
virtualkeyboard_dbus.h<br />
wayland_cursor_theme.h<br />
wayland_server.h<br />
workspace.h<br />
xkb.h<br />
xwl/databridge.h<br />
xwl/drag_x.h<br />
xwl/transfer.h<br />
xwl/xwayland_interface.h</div></div></div><br /><div><strong>To: </strong>zzag, KWin<br /><strong>Cc: </strong>kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart<br /></div>