Add support for building QtWayland on macOS

Change-Id: I98aadd5019e913bf0adcf0122b7b209981926278
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Robert Griebl 2018-05-17 13:27:55 +02:00
parent 19403799d7
commit e16b3c1cc1
2 changed files with 11 additions and 2 deletions

View File

@ -135,7 +135,7 @@ QVariant QWaylandMimeData::retrieveData_sys(const QString &mimeType, QVariant::T
}
int pipefd[2];
if (::pipe2(pipefd, O_CLOEXEC|O_NONBLOCK) == -1) {
if (qt_safe_pipe(pipefd, O_NONBLOCK) == -1) {
qWarning("QWaylandMimeData: pipe2() failed");
return QVariant();
}

View File

@ -52,7 +52,12 @@
#include "qwaylandwindowmanagerintegration_p.h"
#include "qwaylandscreen_p.h"
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#if defined(Q_OS_MACOS)
# include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
# include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
#else
# include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#endif
#include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtThemeSupport/private/qgenericunixthemes_p.h>
@ -121,7 +126,11 @@ public:
};
QWaylandIntegration::QWaylandIntegration()
#if defined(Q_OS_MACOS)
: mFontDb(new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>)
#else
: mFontDb(new QGenericUnixFontDatabase())
#endif
, mNativeInterface(new QWaylandNativeInterface(this))
#if QT_CONFIG(accessibility)
, mAccessibility(new QPlatformAccessibility())