diff options
Diffstat (limited to 'app-text/calibre/files/calibre-2.78.0-qt59-compat.patch')
-rw-r--r-- | app-text/calibre/files/calibre-2.78.0-qt59-compat.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/app-text/calibre/files/calibre-2.78.0-qt59-compat.patch b/app-text/calibre/files/calibre-2.78.0-qt59-compat.patch new file mode 100644 index 00000000..25cea081 --- /dev/null +++ b/app-text/calibre/files/calibre-2.78.0-qt59-compat.patch @@ -0,0 +1,85 @@ +From 82bd2e1a51df0650cb40894c5dc2b958f601a91d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Tue, 16 May 2017 14:20:51 -0400 +Subject: [PATCH] Compatibility with qt5-5.9.0 + +--- + src/calibre/headless/fontconfig_database.cpp | 16 ++++++++++------ + src/calibre/headless/fontconfig_database.h | 12 ++++++++---- + 2 files changed, 18 insertions(+), 10 deletions(-) + +diff --git a/src/calibre/headless/fontconfig_database.cpp b/src/calibre/headless/fontconfig_database.cpp +index 4e87b8f81b..33defd0b48 100644 +--- a/src/calibre/headless/fontconfig_database.cpp ++++ b/src/calibre/headless/fontconfig_database.cpp +@@ -48,14 +48,18 @@ + #include <qpa/qplatformservices.h> + + #if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) +-#include <QtFontDatabaseSupport/private/qfontenginemultifontconfig_p.h> ++# include <QtFontDatabaseSupport/private/qfontenginemultifontconfig_p.h> + #else +-#include <QtPlatformSupport/private/qfontenginemultifontconfig_p.h> ++# include <QtPlatformSupport/private/qfontenginemultifontconfig_p.h> ++#endif ++#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) ++# include <QtFontDatabaseSupport/private/qfontengine_ft_p.h> ++#else ++# include <QtGui/private/qfontengine_ft_p.h> + #endif +-#include <QtGui/private/qfontengine_ft_p.h> + #include <QtGui/private/qguiapplication_p.h> + #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) +-#include <QtGui/private/qhighdpiscaling_p.h> ++# include <QtGui/private/qhighdpiscaling_p.h> + #endif + + #include <QtGui/qguiapplication.h> +@@ -763,7 +767,7 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, void *usrPtr) + + QFontEngine *QFontconfigDatabase::fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) + { +- QFontEngineFT *engine = static_cast<QFontEngineFT*>(QBasicFontDatabase::fontEngine(fontData, pixelSize, hintingPreference)); ++ QFontEngineFT *engine = static_cast<QFontEngineFT*>(QFreeTypeFontDatabase::fontEngine(fontData, pixelSize, hintingPreference)); + if (engine == 0) + return 0; + +@@ -915,7 +919,7 @@ QStringList QFontconfigDatabase::addApplicationFont(const QByteArray &fontData, + + QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const + { +- QString resolved = QBasicFontDatabase::resolveFontFamilyAlias(family); ++ QString resolved = QFreeTypeFontDatabase::resolveFontFamilyAlias(family); + if (!resolved.isEmpty() && resolved != family) + return resolved; + FcPattern *pattern = FcPatternCreate(); +diff --git a/src/calibre/headless/fontconfig_database.h b/src/calibre/headless/fontconfig_database.h +index e2fecff724..62afc129cf 100644 +--- a/src/calibre/headless/fontconfig_database.h ++++ b/src/calibre/headless/fontconfig_database.h +@@ -7,17 +7,21 @@ + #pragma once + + #include <qpa/qplatformfontdatabase.h> +-#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) +-#include <QtFontDatabaseSupport/private/qbasicfontdatabase_p.h> ++#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) ++# include <QtFontDatabaseSupport/private/qfreetypefontdatabase_p.h> ++#elif (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) ++# include <QtFontDatabaseSupport/private/qbasicfontdatabase_p.h> ++# define QFreeTypeFontDatabase QBasicFontDatabase + #else +-#include <QtPlatformSupport/private/qbasicfontdatabase_p.h> ++# include <QtPlatformSupport/private/qbasicfontdatabase_p.h> ++# define QFreeTypeFontDatabase QBasicFontDatabase + #endif + + QT_BEGIN_NAMESPACE + + class QFontEngineFT; + +-class QFontconfigDatabase : public QBasicFontDatabase ++class QFontconfigDatabase : public QFreeTypeFontDatabase + { + public: + #if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) |