[Qt-interest] Qt 4.6.1 build bug with Cocoa (example included)

Thiago Macieira thiago at kde.org
Sat Feb 6 10:29:50 CET 2010


Em Sábado 6. Fevereiro 2010, às 10.18.19, Mike Brancato escreveu:
> Hello,
> 
> I'm building a relatively small application using Qt, and I am getting a
> build error that I have tracked back to Qt.  I have uploaded an example
> project for QT Creator that exists at http://share1t.com/8yosme.  I'm
> hoping someone here can either confirm this issue (I'm using the latest Qt
> Creator 2010.01 - includes Qt 4.6.1), or tell me if what I'm doing is
> unsupported or incorrect.
> 
> I'm including an Objective-C class, or doing Objective-C++.  I'm not that
> good with Objective-C, so this could be some issue in the way I've defined
> the class which inherits NSObject.
> 
> The error I get is:
> /System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:50:
> error: expected unqualified-id before ‘[’ token
> 
> Before that '[' is an array name called "slots" which is a bit too
> coincidental to me to not be a conflict with Qt.  I remember reading that
> with signal/slot definitions, "public slots:" becomes "public :" when the
> compiler reads it, I think Qt is removing the name of this array,
> effectively making it look like "uintptr_t [3];" to the compiler.
> 
> I didn't want to file a bug if this isn't supported (mixing obj-c, but I
> think it is).
> 
> Example project: http://share1t.com/8yosme  (this is very simple)

You can't call an array "slots" if you're using Qt.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100206/09f8dcbe/attachment.bin 


More information about the Qt-interest-old mailing list