RE: [ROOT] ROOT 4.01/04

From: Faine, Valeri (fine@bnl.gov)
Date: Sun Nov 21 2004 - 00:50:08 MET


Hello Jasec,
> 
> Valeri,
> Many thanks for your help.
> I think your hint (and Fons'es) is right ...
> I don't really want to "search" now where this redefinition comes from ...
> (Anyhow, it's almost 2 a.m. here now :-)
> There are exactly 12 (twelve) places in 8 (eight) lines in 1 (one) ROOT
> include file (TGButton.h) to be changed ... from "emit" int "xemitx" ...
> And the problem is gone FOREVER ...

Still interesting side effect .... Certainly I'll add it to may FAQ 
http://root.bnl.gov/QtRoot/QtRoot.html 

Can you provide the further information to understand your case better?

This sounds like you mixed ROOT GUI and Qt GUI within some class
implementation code. I think you should change your design to separate
things.
You may experience some side effect. Qt at some point relies on a few
"well-known" and "simple" CPP macros they are "emit", "signal", "slot". We
did see such sort of things (the macro and the class/method names clash)
with WIN32 layer)

As soon as one makes use of the Qt API within his/her code it is not safe to
"redefine" these Qt macros. On other the hand my guess ROOT team will be
extremely reluctant to forbid the names "emit", "signal", "slot") within the
ROOT code.
  1. We can not change Qt
  2. We can not change ROOT
  3. We can advice user to avoid mixing the Qt GUI and ROOT gui within one
and the same source file.

  Can you see whether the last point may help you?

  Thank you,

> Best regards,
> Jacek.

-----
Best Regards
                                Valeri Fine
Brookhaven National Laboratory
Upton, NY 11973. USA
Phone: +1 631 344 7808
Fax:   +1 631 344 4206



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET