mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
macOS: Fix loading of CoreText font database on newer Qt in the headless plugin
This commit is contained in:
parent
d39087a356
commit
4abffead71
@ -4,6 +4,7 @@
|
||||
#ifdef __APPLE__
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
||||
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
class QCoreTextFontEngine;
|
||||
#else
|
||||
#include <QtPlatformSupport/private/qcoretextfontdatabase_p.h>
|
||||
#endif
|
||||
@ -37,6 +38,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef __APPLE__
|
||||
class GenericUnixServices : public QGenericUnixServices {
|
||||
/* We must return desktop environment as UNKNOWN otherwise other parts of
|
||||
@ -64,7 +66,11 @@ HeadlessIntegration::HeadlessIntegration(const QStringList ¶meters)
|
||||
|
||||
screenAdded(mPrimaryScreen);
|
||||
#ifdef __APPLE__
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
m_fontDatabase.reset(new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>());
|
||||
#else
|
||||
m_fontDatabase.reset(new QCoreTextFontDatabase());
|
||||
#endif
|
||||
#else
|
||||
m_fontDatabase.reset(new QFontconfigDatabase());
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user