mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add platform native interface to headless backed
Used by fontconfigdatabase as of Qt 6.8.0
This commit is contained in:
parent
01a7f72b71
commit
0796e12040
@ -21,6 +21,7 @@ class QCoreTextFontEngine;
|
|||||||
#include <qpa/qplatformwindow.h>
|
#include <qpa/qplatformwindow.h>
|
||||||
#include <qpa/qplatformfontdatabase.h>
|
#include <qpa/qplatformfontdatabase.h>
|
||||||
#include <qpa/qplatformtheme.h>
|
#include <qpa/qplatformtheme.h>
|
||||||
|
#include <qpa/qplatformnativeinterface.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -122,6 +123,13 @@ QAbstractEventDispatcher *HeadlessIntegration::createEventDispatcher() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPlatformNativeInterface *HeadlessIntegration::nativeInterface() const
|
||||||
|
{
|
||||||
|
if (!m_nativeInterface)
|
||||||
|
m_nativeInterface.reset(new QPlatformNativeInterface);
|
||||||
|
return m_nativeInterface.get();
|
||||||
|
}
|
||||||
|
|
||||||
HeadlessIntegration *HeadlessIntegration::instance()
|
HeadlessIntegration *HeadlessIntegration::instance()
|
||||||
{
|
{
|
||||||
return static_cast<HeadlessIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
return static_cast<HeadlessIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
|
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
|
||||||
QStringList themeNames() const override;
|
QStringList themeNames() const override;
|
||||||
QPlatformTheme *createPlatformTheme(const QString &name) const override;
|
QPlatformTheme *createPlatformTheme(const QString &name) const override;
|
||||||
|
QPlatformNativeInterface *nativeInterface() const override;
|
||||||
|
|
||||||
unsigned options() const { return 0; }
|
unsigned options() const { return 0; }
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
QScopedPointer<QPlatformFontDatabase> m_fontDatabase;
|
QScopedPointer<QPlatformFontDatabase> m_fontDatabase;
|
||||||
QScopedPointer<QPlatformServices> platform_services;
|
QScopedPointer<QPlatformServices> platform_services;
|
||||||
|
mutable QScopedPointer<QPlatformNativeInterface> m_nativeInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user