[Qt-creator] #ifdef Linux - code coloring

Liebe Markus (RtP2/TEF72) Markus.Liebe at de.bosch.com
Mon May 18 08:51:37 CEST 2009


Hi,

In a project I have several code sections that are specific for Windows or Linux. To seperate them I use:
#ifdef Linux
// code
#endif

As well as
#ifdef WIN32
// code
#endif

In QtCreator both sections in between the preprocessor commands remain gray.
There is no more syntax highlighting and it looks as if LINUX was not defined.
Although I have specified both defines in the .pro file in a conditional part.
Resulting in the existing -DLINUX on Linux and -DWIN32 on Windows.
See attached screenshot.

Is there anything wrong on how I use the defines? Or is there a problem with QtCreator and its code coloring?

Mit freundlichen Grüßen / Best regards

Markus Liebe

Robert Bosch GmbH
Automotive Electronics, RtP2/TEF72
Postfach 13 42
72703 Reutlingen
GERMANY
www.bosch.com<http://www.bosch.com>

Tel. 07121 35-35246
markus.liebe at de.bosch.com<mailto:markus.liebe at de.bosch.com>

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Hermann Scholl; Geschäftsführung: Franz Fehrenbach, Siegfried Dais;
Bernd Bohr, Rudolf Colm, Volkmar Denner, Gerhard Kümmel, Wolfgang Malchow, Peter Marks,
Peter Tyroller; Uwe Raschke



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090518/0d365a0b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifdefLinuxScreenie.png
Type: image/png
Size: 230414 bytes
Desc: ifdefLinuxScreenie.png
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090518/0d365a0b/attachment.png 


More information about the Qt-creator-old mailing list