tsragravorogh
tsragravorogh

Reputation: 3153

QtCreator and ClangCodeModel plugin

I just installed QtCreator 4.7.2, which comes with ClangCodeModel plugin by default on. After my CMake project was parsed I saw much better highlighting of keywords in the code and also awesome intellisense handling of auto declared variables.

The downside was that the ClangCodeModel plugin was buggy, and gave me errors and warnings in parts of code that didn't make sense, especially the ones in 3rd party library header files. So I was forced to turn it off.

I'm wondering if Clang can be configured in QtCreator, so that minimal checks can happen. I played with these settings, but nothing made a difference:

enter image description here

1) Has anyone been able to configure this plugin in QtCreator so that it can work better? I am mostly concerned about intellisense. I can open the same CMake project in Visual Studio and I have much better intellisense there, but I prefer using Qt Creator.

2) If #1 is not possible because the plugin has bugs, what are the other means of improving intellisense in Qt Creator with CMake projects?

Upvotes: 2

Views: 800

Answers (1)

Benjamin T
Benjamin T

Reputation: 8311

The screenshot you took is from the "Analyzer" settings. The Analyzer performs on-demand checks like running static analysis, clang-tidy, callgrind, etc.

To configure the Code Model, you should go to "C++ > Code Model":

enter image description here

You also have the possibility to override this settings on a per-project basis:

enter image description here

In both cases you can, by clicking on Manage..., create your own configuration with whatever flags you want:

enter image description here

Upvotes: 2

Related Questions