[Qt-creator] Minimizing compile-time conditionals in Qt Creator

andre.poenitz at nokia.com andre.poenitz at nokia.com
Tue Aug 28 10:36:42 CEST 2012


Konstantin Tokarev [annulen at yandex.ru:
> I think this issues is a fault of Qt Creator. While I understand that it may be
> impossible to parse disabled block completely in some cases (not in this one
> btw),

Where do you draw the line (or rather, how should the parser find out where 
to draw the line)?

#ifdef Q_OS_WIN
struct Foo { int foo; }
#else
struct Foo { int bar; }
#endif

Foo f;
f.<Ctrl-Space> ?

A "flat" store is certainly not an option. When keeping track of branches,
each #if has the potential to duplicate the size of data that needs to be stored
in the code model. While it will not be _that_ bad in practice, this will be
prohibitive nevertheless. So what do you suggest?

Andre'





More information about the Qt-creator mailing list