Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable a specific warning in QtCreator

Tags:

c++

qt-creator

I installed the new QtCreator which comes with the new clang language model and provides lots of useful warnings. However one of them annoys me: Winconsistent-missing-destructor-override. How to disable this one and keep the other warnings?

UPDATE: I am talking about the warnings which I get as in-line warnings in the text editor in Qt Creator IDE (which uses Clang toolchain). I am not talking about the warnings produced when compiling the project (which is for example MSVC in my case).

like image 804
V.K. Avatar asked Jul 31 '18 11:07

V.K.


1 Answers

To disable specific warning annotations in the Qt IDE:

Go to Tools -> Options -> C++ -> Code Model

Click Manage next to Diagnostic Configuration

Select Clang-only checks for almost everything[built-in]

Click Copy on the upper right corner

Go to the copied version of the Diagnostics Configuration and append -Wno-inconsistent-missing-destructor-override in the text field under the Clang tab.

You can read more about configuring the Clang Code Model here.

like image 173
GKE Avatar answered Sep 18 '22 02:09

GKE