Hi all

I have a DEFINES QMake directive in my project .pro file which (should) allow me to respond to this with #if #ifdef C++ preprocessor macros in my main.cpp file.

Let assume I have the following

//.pro file
DEFINES += TEST_A

//main.cpp
#ifdef TEST_A
   //Do Something
#endif

#ifdef TEST_B
   //Do Something different
#endif

I build and run my code. As expected, "Something" happens, "Something different" does not.

I then change the pro file

DEFINES += TEST_B
# DEFINES += TEST_A

and build and run again. I expect "Something" to be skipped and "Something different" to happen.

Instead the "Something" happens. i.e. it is as if I made no change to the .pro file.

If I then clean the project, and build and run again, then I get the expected results "Something different".

i.e. changes to the DEFINES setting only take effect once a project has been cleaned.

I suspect that this is a more general Qt / QMake problem rather than a Sailfish specific one.

I am running the Sailfish Alpha 2 (Qt5) hosted on OSX.

GrĂ¼sse

Chris




_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to