[Qt-creator] can qt-creator properly parse C only code?

Jean-Francois Dagenais jeff.dagenais at gmail.com
Sun May 3 15:08:39 CEST 2015


> On Oct 6, 2014, at 16:08, Jean-Francois Dagenais <jeff.dagenais at gmail.com> wrote:
> 
> 
> On Sep 19, 2014, at 9:07, Petar Perisin <petar.perisin at gmail.com> wrote:
> 
>> I kinda did this for SIGNAL keyword which I needed.
>> 
>> You can comment out stuff in 
>> 
>> Keywords.cpp
>> 
>> file, I think.
>> 
>> And recompile QtCrweator after that.
>> 
>> I do not know if it will work for class, but it worked for SIGNAL
> 
> This would make a qt-creator exe which doesnt support C++ correctly anymore though.
> 
> I will try to find an alternative to that, but will keep this info as a fallback.

Hi all,

An old thread, but may be helpful to others.

I ended up doing somewhat like Petar suggested, except I put my removals inside
if's so my Qt Creator wouldn't become unusable for my C++ work.

The only useful criteria I could find for this alternate behaviour to be automatic
is the session name. So by naming my linux kernel session using the keywords:
"linux" or "kernel", the if's kick in and ban all C++ keywords.

Here's the code: https://github.com/jeff-dagenais/qt-creator/commits/c_only_hack

It's based on 3.2 but can probably be rebased easily, haven't tried yet.

Enjoy!
/jfd


More information about the Qt-creator mailing list