Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
Qt Creator 3.3.2, Qt Creator 3.4.2, Qt Creator 3.5.1
-
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.