[Qt-interest] make moc generate .mm file?

Israel Brewster israel at frontierflying.com
Wed Oct 26 01:21:26 CEST 2011


Interesting approach. I'll have to try that. Though it does strike me as somewhat kludgy, given that the mm file has no need of the moc file.

On Oct 25, 2011, at 9:46 AM, Konstantin Tokarev wrote:

> 25.10.2011, 21:29, "Israel Brewster" <israel at frontierflying.com>:
>> Is there any way to get moc to generate a .mm file rather than a .cpp file? I have a file which includes some Objective-C code out of necessity of complying with the possible Mac App Store sandbox requirements (as I can't use Qt's open/save dialogs). However, if moc generates a .cpp file, it won't compile. Changing the extension on this file to .mm fixes things and allows compilation again, but of course it is changed back next time the file is generated. If it could be generated with a .mm extension, then everything would be fine. Is there any way to fix this?
> 
> You can try to #include your moc_xxx.cpp file into respective xxx.mm, and whole thing should be compiled as Obj-C++.
> 
> -- 
> Regards,
> Konstantin

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Era Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x7293
-----------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111025/8578a385/attachment.bin 
-------------- next part --------------



More information about the Qt-interest-old mailing list