[Qt-creator] How to unconditionally include code into the indexer?

Eike Ziller Eike.Ziller at qt.io
Fri Jan 18 11:39:36 CET 2019



> On 18. Jan 2019, at 11:29, Charlie Turner <chturne at gmail.com> wrote:
> 
> Hi,
> 
> My project does "Include what you use" due to legacy reasons that I'm
> afraid will probably never get fixed. What I need to do is #include
> "config.h" as part of the indexer process every time it tries to read
> a file. I remember I could do this with the QtCreator.config file. I'm
> not using CMake and what looks like the fancy new Clang Code Model.
> How can I achieve this in the new environment?
> 
> Second question: I would like to pass to the clang code model the
> option -Wno-expansion-to-undefined, but I'm not sure where I can do
> this.

Options > C++ > Code Model > Diagnostic Configuration > Manage...
Copy a template (best one that doesn’t add too many checks, because that will make code highlighting and completion slower), add the -W argument under the “Clang” tab.

> 
> Thanks,
> 
> -- 
> Kind regards,
>  Charlie.
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list