From 8aee8d40ae2a1c920d3520163d550d3b49720226 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sun, 25 Oct 2020 18:22:58 +0100 Subject: [PATCH] Compile with recent Qt 5.15 More QPrinter methods got deprecated there. DevicePixel no longer exists as a unit, visually Point looks pretty much the same though. --- src/printing/compact/compactstyle.cpp | 2 +- src/printing/grantlee/grantleeprintstyle.cpp | 2 +- src/printing/mike/mikesstyle.cpp | 2 +- src/printing/ringbinder/ringbinderstyle.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/printing/compact/compactstyle.cpp b/src/printing/compact/compactstyle.cpp index d950a963..71e74c0f 100644 --- a/src/printing/compact/compactstyle.cpp +++ b/src/printing/compact/compactstyle.cpp @@ -168,7 +168,7 @@ void CompactStyle::print(const KContacts::Addressee::List &contacts, PrintProgre // print QPrinter *printer = wizard()->printer(); - printer->setPageMargins(20, 20, 20, 20, QPrinter::DevicePixel); + printer->setPageMargins(QMarginsF(20, 20, 20, 20), QPageLayout::Point); progress->addMessage(i18n("Setting up document")); diff --git a/src/printing/grantlee/grantleeprintstyle.cpp b/src/printing/grantlee/grantleeprintstyle.cpp index d7afe8ef..49b5e494 100644 --- a/src/printing/grantlee/grantleeprintstyle.cpp +++ b/src/printing/grantlee/grantleeprintstyle.cpp @@ -38,7 +38,7 @@ GrantleePrintStyle::~GrantleePrintStyle() void GrantleePrintStyle::print(const KContacts::Addressee::List &contacts, PrintProgress *progress) { QPrinter *printer = wizard()->printer(); - printer->setPageMargins(20, 20, 20, 20, QPrinter::DevicePixel); + printer->setPageMargins(QMarginsF(20, 20, 20, 20), QPageLayout::Point); progress->addMessage(i18n("Setting up document")); diff --git a/src/printing/mike/mikesstyle.cpp b/src/printing/mike/mikesstyle.cpp index 9f698c53..81a4bd6f 100644 --- a/src/printing/mike/mikesstyle.cpp +++ b/src/printing/mike/mikesstyle.cpp @@ -107,7 +107,7 @@ MikesStyle::~MikesStyle() void MikesStyle::print(const KContacts::Addressee::List &contacts, PrintProgress *progress) { QPrinter *printer = wizard()->printer(); - printer->setPageMargins(20, 20, 20, 20, QPrinter::DevicePixel); + printer->setPageMargins(QMarginsF(20, 20, 20, 20), QPageLayout::Point); progress->addMessage(i18n("Setting up document")); diff --git a/src/printing/ringbinder/ringbinderstyle.cpp b/src/printing/ringbinder/ringbinderstyle.cpp index 60a39c86..5f600d6a 100644 --- a/src/printing/ringbinder/ringbinderstyle.cpp +++ b/src/printing/ringbinder/ringbinderstyle.cpp @@ -159,7 +159,7 @@ void RingBinderPrintStyle::print(const KContacts::Addressee::List &contacts, Pri config.sync(); QPrinter *printer = wizard()->printer(); - printer->setPageMargins(50, 20, 0, 50, QPrinter::DevicePixel); + printer->setPageMargins(QMarginsF(50, 20, 0, 50), QPageLayout::Point); progress->addMessage(i18n("Setting up document")); -- GitLab