Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 2.7.2, Qt Creator 2.8.0, Qt Creator 3.0.0-rc1
-
None
Description
QtCreator enter into a syntax highlight limbo mode when the code is inside a #if <expr> preprocessor block.
e.g.:
#include <cstdio> #define ENABLE_HIGHLIGHT_LIMBO(EXPR) (EXPR) #if ENABLE_HIGHLIGHT_LIMBO(1) using namespace std; class Foo { public: virtual void foo(int a) { printf("%s : %d\n", __func__, a); } }; int main() { Foo f; f.foo(__LINE__); } #endif
If you comment the #if line will will see the "std" and "Foo" purple and the foo() on foo(_LINE_) italic for being a virtual call, if you leave it as is all this will be on pure black, with no syntax highlight helper :-/
This issue affect all hackers working on WebKit with QtCreator.