On Fri, Mar 23, 2007 at 08:51:57AM +0100, Peter Kümmel wrote:
> Andre Poenitz wrote:
> > On Fri, Mar 23, 2007 at 12:06:27AM +0100, Peter Kümmel wrote:
> >> Merging qt4 on linux does not work, because xlib.h defines some symbols
> > 
> > There is no xlib.h on my system.
> > 
> >> and gcc couldn't resolve symbols, which looks like a gcc bug.
> > 
> > I know you won't believe me, but gcc bugs are less rare than
> > you seem to believe.
> 
> I also think it's not really a bug but a it's
> very mysterious compiler error:
> #include <Qt>
> which defines the enum Qt::CursorShape
> but then gcc complains about using CursorShape
> viewFullSourceCB->setCursor(QCursor(static_cast<Qt::CursorShape>(0)));
> 
> Maybe Qt::CursorShape  could not be used as type? I also had this
> behavior when adding the enum for the windows-maximized flag:
> gcc doesn't like the enum as type only using int was the
> solution.

There's a 

  #define CursorShape 0

in X.h.

The usual workaround is to put

        #undef CursorShape

after the last X related #include.

I wonder, however, how this define leaks into our code. IIRC there was
some time when the X includes where removed from the public Qt headers,
so it is quite likely our own doing.

Andre'

Reply via email to