On Jul 7, 2011, at 19:59, ext Konstantin Tokarev wrote:

> 
> 
> 07.07.2011, 19:20, [email protected]:
>> On Jul 7, 2011, at 16:08, ext Konstantin Tokarev wrote:
>> 
>> But for code completion, you only need the engine that does the actual code 
>> completion to handle it, and only that single engine gets those defines. 
>> That engine just happens to be the one in libclang.so (which does not even 
>> contain a code generator).
>> 
>>>  2. Clang assumes that anything in AST has its representation in source 
>>> code. You are creating "phantom" attributes which don't exist in actual 
>>> code.
>> 
>> They are just as real as __attribute__((__deprecated__)) when used through 
>> Q_DECL_DEPRECATED, so nothing phantom.
>> 
>>>  BTW, haven't you considered creation of custom AST nodes (i.e., subclass 
>>> CXXRecordDecl) with additional fields?
>> 
>> Yes, but this would be quite a big change (the current patch file is 233 
>> lines).
> 
> But it could be implemented without patching of Clang.

AFAIK, you cannot introduce another AST node without patching clang, nor change 
the parser (which should create that node) without changing clang.

Then again, if I'm wrong, show me the code to do it right. I will happily use 
it! :-)

>> Plus, this is also the way that IBOutlet/IBAction (or after preprocessor 
>> expansion: __attribute__((iboutlet)) and __attribute__((ibaction)) ) are 
>> handled. And those two happen to do nearly the same for Cocoa/ObjC as 
>> Q_SIGNAL/Q_SLOT for Qt ;-)
> 
> AFAIK, IBOutlet/IBAction apply to single identifier (field or method, 
> respectively)


Yes, just like Q_SIGNAL/Q_SLOT. The "fun" part is 
Q_SIGNALS/signals/Q_SLOTS/slots.

Cheers,
Erik.
-- 
Erik Verbruggen
Product manager Qt Creator
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori




_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to