[Qt-interest] Qt 4.6.1 build bug with Cocoa (example included)
André Somers
andre at familiesomers.nl
Sat Feb 6 14:18:21 CET 2010
I thought you could turn off the Qt keywords, and use Q_SLOTS instead? Try
to add this to your .pro file:
CONFIG += no_keywords
Note that all Qt signal/slot related keywords in your code will need to be
replaced with their macro counterparts:
slot -> Q_SLOT
slots -> Q_SLOTS
emit -> Q_EMIT
signals -> Q_SIGNALS / Q_SIGNAL
André
-----Oorspronkelijk bericht-----
Van: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Namens Thiago Macieira
Verzonden: zaterdag 6 februari 2010 10:30
Aan: qt-interest at trolltech.com
Onderwerp: Re: [Qt-interest] Qt 4.6.1 build bug with Cocoa (example
included)
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
More information about the Qt-interest-old
mailing list