Fix Qt deprecation warning. QPrinter::setOrientation() is obsolete.
This commit is contained in:
@@ -226,7 +226,7 @@ bool SheetView::onHasMsg(const char *pMsg) const
|
||||
void SheetView::print()
|
||||
{
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
printer.setOrientation(QPrinter::Landscape);
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
printer.setFullPage(true);
|
||||
QPrintDialog dlg(&printer, this);
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
@@ -237,7 +237,7 @@ void SheetView::print()
|
||||
void SheetView::printPreview()
|
||||
{
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
printer.setOrientation(QPrinter::Landscape);
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
QPrintPreviewDialog dlg(&printer, this);
|
||||
connect(&dlg, SIGNAL(paintRequested (QPrinter *)),
|
||||
this, SLOT(print(QPrinter *)));
|
||||
@@ -263,7 +263,7 @@ void SheetView::printPdf()
|
||||
QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF file")));
|
||||
if (!filename.isEmpty()) {
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
printer.setOrientation(QPrinter::Landscape);
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setOutputFileName(filename);
|
||||
print(&printer);
|
||||
|
||||
Reference in New Issue
Block a user