Enrico Forestieri <[EMAIL PROTECTED]> writes:
>> It seems to me that this extra define is not really needed...
>
> It is needed because the window system choice is made in qglobal.h and
> I see no other way to have Q_WS_WIN32 defined, rather than Q_WS_X11. 
> In other words, Q_WS_WIN32 gets defined on cygwin only because Q_CYGWIN_WIN
> is defined. When building Qt, this is accomplished in qmake.conf through
> QMAKE_COMPILER_DEFINES += Q_CYGWIN_WIN

OK, I see now that Q_CYGWIN_WIN is a creation from you :) I read a bit
the page
http://wiki.lyx.org/LyX/LyXOnCygwin
and the impressive patch therein. BTW, is there a reason why you do not
start from qt-all-opensource-4.x.y instead of merging by hand the X11
and win32 versions?

> So, you are right that there is no difference, but only because
> Q_CYGWIN_WIN is defined, otherwise Q_WS_WIN32 and Q_OS_CYGWIN would
> never be both defined at the same time.
> On Mac, the role of Q_CYGWIN_WIN is played by __USE_WS_X11__ and maybe
> I could have used that. 

Yes.

> But I don't see the point, as instead of defining Q_CYGWIN_WIN you
> would have to anyway define __USE_WS_X11__ and then instead of simply
> #if defined(Q_OS_UNIX) && !defined(Q_CYGWIN_WIN) you would have to use
> the ugly #if defined(Q_OS_UNIX) && !(defined(Q_WS_WIN32) &&
> defined(Q_OS_CYGWIN))

I suspect that with the size of you patch to qt source already it would
not be a huge effort to make it undefine define __USE_WS_X11__ and add
the relevant code to qglobal.h. Even Q_CYGWIN_WIN could be defined there
and output to the cflags in pkgconfig files. I do not see why LyX has to
catter for that by itself.

JMarc

Reply via email to