]> git.lyx.org Git - features.git/commitdiff
Cmake build with qt6 on MAC
authorKornel Benko <kornel@lyx.org>
Fri, 26 Mar 2021 12:09:32 +0000 (13:09 +0100)
committerKornel Benko <kornel@lyx.org>
Fri, 26 Mar 2021 12:11:44 +0000 (13:11 +0100)
Patch from P. De Visschere
Citing:
I also must exclude the QMacPasteboardMimeGraphics class in
GuiApplication.cpp since QMacPasteboard is not available anymore with qt6.

and add an #include <QStandardPaths> in support/Package.cpp (I suppose
this will pose no problem for qt5 but have not checked it, it's only
needed with USE_MACOSX_PACKAGING)

src/frontends/qt/GuiApplication.cpp
src/support/Package.cpp

index e6964edfb29b4a9f7b01009ee66c7936f141d48c..aaff33526614111cb03a12504f28c0fd1ef9e370 100644 (file)
 #endif
 #endif
 
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && (QT_VERSION < 0x060000)
 #include <QMacPasteboardMime>
 #endif // Q_OS_MAC
 
@@ -752,7 +752,7 @@ public:
 //
 ////////////////////////////////////////////////////////////////////////
 
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && (QT_VERSION < 0x060000)
 // QMacPasteboardMimeGraphics can only be compiled on Mac.
 
 class QMacPasteboardMimeGraphics : public QMacPasteboardMime
@@ -1048,7 +1048,7 @@ struct GuiApplication::Private
        Qt::ApplicationState last_state_;
 #endif
 
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && (QT_VERSION < 0x060000)
        /// Linkback mime handler for MacOSX.
        QMacPasteboardMimeGraphics mac_pasteboard_mime_;
 #endif
index a349a5e755fef7e3812952967490016e4fb32027..a779544f9999893e416985db15a6e441e10e1fcd 100644 (file)
@@ -43,6 +43,7 @@
 # include "support/qstring_helpers.h"
 # include <QDir>
 # include <QDesktopServices>
+# include <QStandardPaths>
 #endif
 
 using namespace std;