Commit 68d3eee3 authored by Ömer Fadıl Usta's avatar Ömer Fadıl Usta 😊
Browse files

Portaway from Obsolete methods of QPrinter

setOrientation -> setPageOrientation
QPrinter::Landscape -> QPageLayout::Landscape
parent f6f955f5
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment