diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-03-30 14:35:26 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-04-04 15:01:38 +0000 |
commit | 2b9ecfe69c01085fbafb6c3c83b7ca4a5f564f8a (patch) | |
tree | 9c4353db4045e9b249b9a54299a6c6f30a253bea /src/plugins/platforms/ios | |
parent | cd8d2c17438eb1668eeaa244965a8b393fbbb655 (diff) |
macOS: Split out font engine creation from QCoreTextFontDatabase
The Core Text font database can produce both Core Text and FreeType font
engines. Refactor the code a bit so that the actual factory methods that
differ between the two stand out, and do not require a granular runtime
check in each method.
Change-Id: Ib70f76f4a9001a8108d87c1101a50699a6ea8f55
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index fbf167b514..5c42828885 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -69,13 +69,15 @@ QT_BEGIN_NAMESPACE +class QCoreTextFontEngine; + QIOSIntegration *QIOSIntegration::instance() { return static_cast<QIOSIntegration *>(QGuiApplicationPrivate::platformIntegration()); } QIOSIntegration::QIOSIntegration() - : m_fontDatabase(new QCoreTextFontDatabase) + : m_fontDatabase(new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>) #if !defined(Q_OS_TVOS) && !defined(QT_NO_CLIPBOARD) , m_clipboard(new QIOSClipboard) #endif |