[Qt-creator] #ifdef Linux - code coloring

André Pönitz andre.poenitz at nokia.com
Mon May 18 09:57:35 CEST 2009


On Monday 18 May 2009 08:51:37 ext Liebe Markus (RtP2/TEF72) wrote:
> 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

Have you considered using 

 #ifdef Q_OS_LINUX
 // code
 #endif
 
and

 #ifdef Q_OS_WIN
 // code
 #endif

?

Andre'



More information about the Qt-creator-old mailing list