On Fri, Oct 10, 2008 at 03:33:00PM +0200, Jean-Marc Lasgouttes wrote: > Looking at the uses of Q_CYGWIN_WIN in our own code, I see two of them: > > 1/ in GuiApplication.cpp: > > #ifdef Q_WS_WIN > #include <QWindowsMime> > #if defined(Q_CYGWIN_WIN) || defined(Q_CC_MINGW) > #include <wtypes.h> > #endif > #include <objidl.h> > #endif // Q_WS_WIN > > We can use Q_OS_CYGWIN here, can't we?
Yes, Q_OS_UNIX would also do, but it is better to replace the entire line with "#ifdef Q_CC_GNU" (see below) > Why is the <wtypes.h> header needed BTW? It brings in a missing define when compiling with gcc but I don't remember anymore which one it was. > 2/ in FileDialog.cpp > > #if defined(Q_WS_MACX) || (defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN)) > #define USE_NATIVE_FILEDIALOG 1 > #endif > > I think Q_OS_CYGWIN is OK here too. Ditto. > The advantage of getting rid of Q_CYGWIN_WIN in our code is to make it > generic and not depend on your port (qt may be be ported to cygwin one > day, after all). It already does not depend on my port. I use the same port for building an X11 version and LyX works perfectly, as does the official cygwin port of lyx 1.4.5 with Qt3, despite the fact that also the 1.4.x sources are tainted by Q_CYGWIN_WIN. I like Fridays... -- Enrico