31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
From 0a5dc07da1cb0f9409803b4df1a92e497e3c0e95 Mon Sep 17 00:00:00 2001
|
|
From: Eli Schwartz <eschwartz@archlinux.org>
|
|
Date: Wed, 19 Jun 2019 11:04:06 -0400
|
|
Subject: [PATCH] fix qt 5.13 compatibility
|
|
|
|
In https://github.com/qt/qtbase/commit/01e1df90a7debd333314720fdd5cf6cd9964d796,
|
|
screenAdded was deprecated, and as of qt 5.13 it is fully removed. Adapt
|
|
to this change by using the new API in QWindowSystemInterface.
|
|
---
|
|
src/calibre/headless/headless_integration.cpp | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/src/calibre/headless/headless_integration.cpp b/src/calibre/headless/headless_integration.cpp
|
|
index 7dc2fce583..c35bb52dd3 100644
|
|
--- src/calibre/headless/headless_integration.cpp
|
|
+++ src/calibre/headless/headless_integration.cpp
|
|
@@ -64,7 +64,12 @@ HeadlessIntegration::HeadlessIntegration(const QStringList ¶meters)
|
|
mPrimaryScreen->mDepth = 32;
|
|
mPrimaryScreen->mFormat = QImage::Format_ARGB32_Premultiplied;
|
|
|
|
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
|
|
+ QWindowSystemInterface::handleScreenAdded(mPrimaryScreen);
|
|
+#else
|
|
screenAdded(mPrimaryScreen);
|
|
+#endif
|
|
+
|
|
#ifdef __APPLE__
|
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
|
m_fontDatabase.reset(new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>());
|
|
|