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 <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)
This commit is contained in:
Kornel Benko 2021-03-26 13:09:32 +01:00
parent 4671214f3d
commit a9b0f5faae
2 changed files with 4 additions and 3 deletions

View File

@ -153,7 +153,7 @@
#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

View File

@ -43,6 +43,7 @@
# include "support/qstring_helpers.h"
# include <QDir>
# include <QDesktopServices>
# include <QStandardPaths>
#endif
using namespace std;