Hi, everyone. I'm sorry, no_keywords may be more than some people bargin for. What I mentioned is true, but there are other side effects. Specifically, Qt may redefine foreach and forever unless no_keywords is used (they provide Q_FOREACH and Q_FOREVER as alternatives).
I'm not trying to confuse the issue here (emit and signals/slots), but I didn't want anyone caught off guard by unexpected side effects. As always, I recommend reading the documentation and headers for best results (which is fairly useful in this case). D.J. On Fri, Aug 28, 2009 at 2:42 PM, D.J. Caldwell<dlcaldwel...@gmail.com> wrote: > Hi, Maxim, > > Qt can be built and used with a no_keywords flag so that Qt does not > redefine the names emit, signal, or slot. One uses Q_EMIT, Q_SIGNAL, > and Q_SLOT instead. > > The no_keywords flag exists so that Qt doesn't cause interference with > 3rd party signal/slot mechanisms, but I think it applies here in > principle (that being, Qt and OSG are conflicting). > > Check out the Qt documentation and headers for how this works in > practice. no_keywords may be more viable than forcing the change on > OSG (or other packages). > > I hope this helps. > > D.J. > > On Fri, Aug 28, 2009 at 12:37 PM, Maxim Gammer<maxgam...@gmail.com> wrote: >> Hi Tom, >> >> this solution won't let us use signal/slot stuff ( >> >> 2009/8/28 Jolley, Thomas P <thomas.p.jol...@boeing.com> >>> >>> Hi Maxim, >>> >>> What was the result of adding -DQT_NO_EMIT to the compilation flags that >>> Antonin Linares suggested? >>> >>> >>> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg27183.html >>> >>> ---- >>> Tom Jolley >>> >>> ________________________________ >>> From: Maxim Gammer [mailto:maxgam...@gmail.com] >>> Sent: Friday, August 28, 2009 6:02 AM >>> To: OpenSceneGraph Users >>> Subject: [osg-users] Improvement of QT and OSG compatibility >>> >>> Hello, >>> >>> I've got a proposal to make changes in OSG for better compatibility with >>> QT. >>> >>> Method's name "emit" needs to be replaced in namespace osgParticle. >>> >>> The thing is that "emit" is a name of the macros in QT. Of course, we can >>> redefine "emit" like that: >>> >>> #ifdef emit >>> >>> #define MACRO1_SAVE emit >>> >>> #endif >>> >>> #undef emit >>> >>> .....#include <osg....> >>> >>> #ifdef MACRO1_SAVE >>> >>> #define emit MACRO1_SAVE >>> >>> #undef MACRO1_SAVE >>> >>> #endif >>> >>> , but this solution won't let us use signal/slot stuff. >>> >>> It seems that QT preprocessor replaces "emit" in program listing. >>> >>> The simpliest way to solve that - change method name from "emit" to >>> something else. This will let us using signal/slot things in QT. >>> >>> -- >>> Maxim Gammer >>> >>> >>> _______________________________________________ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>> >> >> >> >> -- >> Maxim Gammer >> >> >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org