[Qt-creator] #if 0 not evaluated?

Nikolai Kosjar nikolai.kosjar at theqtcompany.com
Mon Aug 31 11:56:54 CEST 2015


Hi!

On 08/31/2015 10:30 AM, alexis jeandet wrote:
> Ok I think I understood, I would expect no syntax coloration, but I got
> this(see attachment). In fact it's not obvious when the corresponding
> code is quite big you don't see so well. Wouldn't it be better to make
> it like comments? I attached also what I get with gedit, it may be
> hardcoded since only the first one is detected, isn't it better to gray
> the code?
>
> Anyway sorry for my mistake, there is no bug.

At times even ifdeffed out code needs to be edited and then the syntax 
highlighting helps a bit.

Note that you can customize the colors at Menu: Tools > Options... > 
Text Editor (on the left) > Tab: "Font & Colors" - the relevant entry is 
"Disabled Code".

> Le lundi 31 août 2015 à 09:37 +0200, alexis jeandet a écrit :
>> Hi,
>>
>> I'm using Qt creator 3.4.2 built with Qt 5.5.0, the one distributed
>> with Fedora 22. I also use the Qt creator's builtin code model(same
>> issue with clang).
>> Maybe it disappear in QTC 3.5, I will check with 3.5 then fill a
>> bugreport.
>>
>> Best regards,
>> Alexis.
>> Le lundi 31 août 2015 à 05:20 +0000, Stenger Christian a écrit :
>>> Hi,
>>>
>>> I cannot reproduce the mentioned issue with neither 3.5 branch nor
>>> master, no matter if I'm using Qt Creator's builtin code model nor
>>> using experimental Clang code model. Checked the mentioned file as
>>> well as others.
>>>
>>> Could you please try to provide more information (QC version, OS,
>>> Code model, ...) and file a bugreport at https://bugreports.qt.io (
>>> Co
>>> mponents: C/C++ support).
>>>
>>> Kind regards,
>>> Сhristian
>>>
>>>
>>> ________________________________________
>>> From:
>>> qt-creator-bounces+christian.stenger=theqtcompany.com at qt-project.or
>>> g
>>> <qt-creator-bounces+christian.stenger=theqtcompany.com at qt-project.o
>>> rg
>>>> on behalf of alexis jeandet <alexis.jeandet at lpp.polytechnique.fr>
>>> Sent: Saturday, August 29, 2015 11:58 AM
>>> To: qt-creator
>>> Subject: [Qt-creator] #if 0 not evaluated?
>>>
>>> Hi,
>>>
>>> I saw a weird behavior, a "#if 0" isn't expanded as it should be,
>>> the
>>> code isn't grayed is it a bug?
>>> Here is the file where I found this behavior:
>>> https://github.com/codekipper/linux-sunxi/blob/audio_mainlining/sou
>>> nd
>>> /s
>>> oc/sunxi/sunxi-i2s.c#L236
>>>
>>> I tried on other files, I get the same behavior.
>>>
>>> Best regards,
>>> Alexis.
>>> _______________________________________________
>>> Qt-creator mailing list
>>> Qt-creator at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>> _______________________________________________
>>> Qt-creator mailing list
>>> Qt-creator at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator



More information about the Qt-creator mailing list