There are some clang-tidy warnings which cannot properly handle the
extensions used in the Qt code so the produce lots of false positives
and were previously enabled. With clang-tidy now offering the
possibility to inherit the parent configuration we can enable these
across the project and simply disable them for the GUI code.
No additional warnings were found as they were already fixed in earlier
commits without enabling the checks in question.
Running clang-tidy with `--enable-check-profile` provides an overview of
the run-time of each check. This revealed some checks which take a
considerable amount of time which could be disabled.
Here's the times for the checks in question. The times are very similar
across most files:
```
---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
...
0.4531 ( 4.7%) 0.3906 ( 6.1%) 0.8438 ( 5.2%) 0.8127 ( 5.1%) misc-unused-using-decls
...
0.3281 ( 3.4%) 0.2344 ( 3.7%) 0.5625 ( 3.5%) 0.4509 ( 2.8%) modernize-macro-to-enum
...
0.2188 ( 2.2%) 0.2031 ( 3.2%) 0.4219 ( 2.6%) 0.3621 ( 2.3%) modernize-use-nullptr
```
Qt 5.15 will be EOL on May 26 so we should start switching away from it.
We already have issues with many of the previous versions and qmake on
legacy distros so we should cut that off.
I will add a Qt6 release build for Windows in another PR so it can be
tested. We should switch to it as the delivered build after the next
release and stop using Qt5 altogether in the CI in the release
afterwards (that would get rid of several build steps). We could leave
it so you could still try to build it but no longer support it so it is
up to the user to get it to work before removing it completely later on.
* added `clang-tidy.md` to document our `.clang-tidy` configuration
* disabled some clang-tidy checks which are not necessary and slow down the analysis
* clang_tidy.cmake: added clang-tidy-11 to list of executables to look for
* .clang-tidy: disabled warnings we are (currently) not interested in
* fixed clang-tidy warnings
* CMakeLists.txt: there is no REQUIRED option for include()
* added a "run-clang-tidy" target when the executable exists / always create compilation database / added .clang-tidy with all existing warnings have been disabled for now