Base project for syntax high-lighting in Qt creator
-
The syntax high-lighting of Qt craetor is one of the very usefull features. However, it does not always perform as expected.
Using macros in C++ are often used to define blocks of code for special compiling conditions. E.g.
@
#ifdef MY_BLOCK
some statements
#endif
@
may be compiled when the macro MY_BLOCK is defined during compilation. qmake facilitates in respect and one can add into the .pro file:
@
DEFINES += MY_BLOCK
@When adding the block definition to the code and adding the DEFINES-line to the active .pro file Qt creator does the proper high-lighting.
My session contains basically two different project setups and it includes the same .pri file with the same source files. The different .pro files are basically distinguishing between two different setups for different targets.
Reloading the session suddenly rendered the code block as not used. This is despite the fact the active project still holds the macro in DEFINES. Only the non-active project does not hold the macro.
Switching forth and back for making active between projects did not change the situation.
Is there a switch somewhere to activate rescanning of active project setup?