Using Clazy checks for Clang and C++
In this chapter, we will learn how to use the Clazy checks from the Clang toolset to automatically display warnings when obsolete Qt 5 classes and functions are detected in your Qt project.
How to do it…
Let’s get started by following these steps:
- We will use the same project from the preceding example. Then, proceed to open up the preferences window by going to Edit | Preferences….
- After that, go to the Analyzer page and click on the button beside Diagnostic configuration:
![Figure 6.1 – Open up the Diagnostic configuration window](https://static.packt-cdn.com/products/9781805122630/graphics/image/B20976_06_001.jpg)
Figure 6.1 – Open up the Diagnostic configuration window
- Select the Default Clang-Tidy and Clazy checks option at the top and click the Copy… button, as shown in Figure 6.2. Give it a name and click OK. The new option will now appear under the Custom category:
![Figure 6.2 - Click on the Copy button](https://static.packt-cdn.com/products/9781805122630/graphics/image/B20976_06_002.jpg)
Figure 6.2 - Click on the Copy button
- Then, open the Clazy Checks tab, enable the following...