Commit graph

6 commits

Author SHA1 Message Date
Vlad Zagorodniy
8af2fa73dc Run clang-tidy with modernize-use-override check
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.

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

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

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

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

The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22371
2019-07-22 20:03:22 +03:00
Martin Gräßlin
48a6272916 [tests] Support a trasient window in the waylandclienttest
Main purpose is to reproduce a crash if the parent window gets
destroyed before the transient. For this the following key combo
can be used:
t: show transient
k: close parent window
q: quit application

This currently causes reliably a crash in Deleted::copyToDeleted for
the connect of the mainClients.
2015-10-01 14:03:48 +02:00
Martin Gräßlin
199cd70416 [tests] WaylandClientTest can maximize/restore on middle click 2015-06-07 03:29:06 +02:00
Martin Gräßlin
3c6fd0190b [tests] Only use KWayland in the waylandclienttest
No need for Wayland::Client any more - KWayland encapsulates the usage.
2015-03-23 09:54:37 +01:00
Martin Gräßlin
237ee7fcc7 wayland_client and wayland_server moved to kwayland
kwayland is provided by kde:kwayland and is located at
kde/workspace/kwayland

It's an optional build dependency needed only for kwin_wayland.
2014-09-19 13:59:51 +02:00
Martin Gräßlin
e125cbc4e6 [tests] Add a waylandclienttest application
A small test application to use the Wayland Client classes. It opens
a fullscreen Shell surface and reacts to input events:
* q quits
* left click toggles the background color animation
* right click quits

REVIEW: 119883
2014-08-27 08:57:21 +02:00