Am 04.03.2014 um 22:40 schrieb Georg Baum <georg.b...@post.rwth-aachen.de>:
> Stephan Witt wrote: > >> In principle you're right. But I've never seen LyX on X11 OSX. I'm not >> sure what this is - X11 OSX. Perhaps a Darwin application running with X11 >> server like old Gimp versions. > > Exactly. I have to admit that it is years ago since I saw an OS X with X > server (and it was on a PPC ibook). > >> I don't believe it is possible to compile and run this with our >> auto tools build. So, I think one can say: we don't support X11 on Mac. >> >> At least I don't know how to create such a piece of program. > > Me neither. I simply looked at the #defines, and from those it looks like > qt4 can be built for this configuration. > >> This is a possibility. The problem with this approach is: Q_WS_MACX is a >> check for a window system and Q_OS_MACX a check for a platform (I think >> you're aware of this difference). > > Yes, I am. > >> With Qt-4.x and LyX the check for the >> platform is a synonym for the check for the window system. > > You mean with Qt 5.x? Not really. I used the wrong wording. With Qt-4.x many open source applications contained checks for Q_WS_MAC where a test for Apple APIs is needed, like LyX. With Qt5.x these defines where dropped to disable platform specific code not implemented yet with QPA code, IMO. This "trick" forces all the poor developers using the Q_WS_MAC or Q_WS_WIN defines to rework their code, like LyX. :( >> And I'm not sure if Q_xxx macros are sacrosanct and shouldn't defined by >> LyX. > > In that case one could easily use LYX_WS_OSX in the code and do the > following in config.h: > > #if QT_VERSION >= 0x050000 > #ifdef Q_OS_MACX > #define LYX_WS_MACX > #endif > #else > #ifdef Q_WS_MACX > #define LYX_WS_MACX > #endif > #endif Yes, that's Benjamin's proposal, isn't it? > >> But the argument with Qt-4.x testing is strong. >> >> Should I try this? > > I think that would be great. Since Benjamin helped so nicely with bug fixing > I think he deserves a version which build easily with qt5. The attached patch contains the modifications for auto tools to define Q_WS_MAC with Qt-5.x and add the QtMacExtras framework for Qt-5.2.x. Only the cmake part of Benjamin's patch is missing. Do we want the change to Q_OS_MACX or the self made Q_WS_MACX define? I'd prefer the change to Q_OS_MACX after all. (That's Benjamin's 0003-Qt5-support-for-Mac.patch + HAVE_Q_MAC_PASTEBOARD_MIME check) (The HAVE_Q_MAC_PASTEBOARD_MIME check is needed for Qt-5.0 and Qt-5.1) The attached patch results in a LyX build with Qt-5.x missing the menus mentioned in #8925. Benjamin's menubar patch 0001-Fix-bug-8925-menubar-not-displayed-in-Mac-OS-10.9.2.patch is needed to make them appear again. But this isn't a low hanging fruit. IMO, Qt-5.x changed too much. It crashed on exit with Qt-5.x when closing the document window before. Now I cannot reproduce this anymore but LyX quits on close of the last document. That's also not to be expected. I'm not sure anymore if this the right fix. :( I have to consult more Qt-examples and docs to make a statement. Stephan
Qt5-support-for-Mac-config2.patch
Description: Binary data