commit:     02a0659d4ac4c6ad621d4655781c8ef2acba1697
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 19:55:17 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 20:04:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02a0659d

kde-apps/kompare: Fix build with Qt 5.15.2

Upstream commit 68d3eee36c48a2f44ccfd3f9e5a36311b829104b

Reported-by: Sergej Petrushkin <psn8402 <AT> gmail.com>
Closes: https://bugs.gentoo.org/757621
Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kompare/files/kompare-20.08.3-qt-5.15.2.patch  | 44 ++++++++++++++++++++++
 kde-apps/kompare/kompare-20.08.3.ebuild            |  2 +
 2 files changed, 46 insertions(+)

diff --git a/kde-apps/kompare/files/kompare-20.08.3-qt-5.15.2.patch 
b/kde-apps/kompare/files/kompare-20.08.3-qt-5.15.2.patch
new file mode 100644
index 00000000000..c29f957d70d
--- /dev/null
+++ b/kde-apps/kompare/files/kompare-20.08.3-qt-5.15.2.patch
@@ -0,0 +1,44 @@
+From 68d3eee36c48a2f44ccfd3f9e5a36311b829104b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20USTA?= <[email protected]>
+Date: Thu, 17 Sep 2020 22:12:57 +0300
+Subject: [PATCH] Portaway from Obsolete methods of QPrinter
+
+setOrientation -> setPageOrientation
+QPrinter::Landscape -> QPageLayout::Landscape
+---
+ komparepart/kompare_part.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/komparepart/kompare_part.cpp b/komparepart/kompare_part.cpp
+index 42d3120..88346d6 100644
+--- a/komparepart/kompare_part.cpp
++++ b/komparepart/kompare_part.cpp
+@@ -26,6 +26,7 @@
+ #include <QMenu>
+ #include <QPainter>
+ #include <QPrinter>
++#include <QPageLayout>
+ #include <QPrintDialog>
+ #include <QPrintPreviewDialog>
+ #include <QTemporaryDir>
+@@ -610,7 +611,7 @@ void KomparePart::saveDiff()
+ void KomparePart::slotFilePrint()
+ {
+     QPrinter printer;
+-    printer.setOrientation(QPrinter::Landscape);
++    printer.setPageOrientation(QPageLayout::Landscape);
+     QPrintDialog* dlg = new QPrintDialog(&printer, nullptr);
+ 
+     if (dlg->exec() == QDialog::Accepted)
+@@ -625,7 +626,7 @@ void KomparePart::slotFilePrint()
+ void KomparePart::slotFilePrintPreview()
+ {
+     QPrinter printer;
+-    printer.setOrientation(QPrinter::Landscape);
++    printer.setPageOrientation(QPageLayout::Landscape);
+     QPrintPreviewDialog dlg(&printer);
+ 
+     connect(&dlg, &QPrintPreviewDialog::paintRequested, this, 
&KomparePart::slotPaintRequested);
+-- 
+GitLab
+

diff --git a/kde-apps/kompare/kompare-20.08.3.ebuild 
b/kde-apps/kompare/kompare-20.08.3.ebuild
index 528c7be9361..bd56709d12e 100644
--- a/kde-apps/kompare/kompare-20.08.3.ebuild
+++ b/kde-apps/kompare/kompare-20.08.3.ebuild
@@ -38,3 +38,5 @@ DEPEND="
        >=kde-frameworks/kxmlgui-${KFMIN}:5
 "
 RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-qt-5.15.2.patch" )

Reply via email to