[Qt-creator] QtCreator C++ code parser and clang integration status

Flex Ferrum flexferrum at gmail.com
Wed Feb 1 19:02:41 CET 2012

2012/2/1 André Pönitz <andre.poenitz at nokia.com>:
> On Wednesday 01 February 2012 16:13:20 ext Thomas Gahr wrote:
>> But (I think) the expansion for SLOT(foo(int)) where foo is a member of say
>> struct Bar would need to be something like:
>> (void(Bar::*)(int) &Bar::foo)
> The expansion _is_ a string literal.
> But one could probably "fake" a pointer-to-member-function, but that
> would require the definition of 'Bar' being accessible for further processing
> later on, which is, however,  not needed in a Qt context, and e.g. Qt Creator's
> "weak  plugin dependencies" are consciously(!) exploiting this fact.
Just imagine what during clang processing "SLOT(foo(int))" is
expanding into something like this:


AST processor/analyzer (e.g. cppeditor plugin) handles this case as a
special case and does corresponding work.

When the same code is processed by the compiler, "SLOT(foo(int))" is
expanded to a string literal.

Best Regards,
Flex Ferrum

More information about the Qt-creator mailing list