From a9b0f5faae83d5a44b044bd71d400d03fbe96257 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Fri, 26 Mar 2021 13:09:32 +0100 Subject: [PATCH 1/1] Cmake build with qt6 on MAC 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 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 | 6 +++--- src/support/Package.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index e6964edfb2..aaff335266 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -153,7 +153,7 @@ #endif #endif -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && (QT_VERSION < 0x060000) #include #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 diff --git a/src/support/Package.cpp b/src/support/Package.cpp index a349a5e755..a779544f99 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -43,6 +43,7 @@ # include "support/qstring_helpers.h" # include # include +# include #endif using namespace std; -- 2.39.5