Qt6: Various include, QPrinter, and QFlags adaptations

Task-number: QTCREATORBUG-24098
Change-Id: I7aca7d25a063c84d6eec14c2c5789357ce56a7b3
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-09-28 17:28:05 +02:00
parent bc4e76f76b
commit bbe95b5733
4 changed files with 12 additions and 9 deletions

View File

@@ -851,7 +851,7 @@ void FormEditorData::print()
QPrinter *printer = ICore::printer();
const bool oldFullPage = printer->fullPage();
const QPrinter::Orientation oldOrientation = printer->orientation ();
const QPageLayout::Orientation oldOrientation = printer->pageLayout().orientation();
printer->setFullPage(false);
do {
// Grab the image to be able to a suggest suitable orientation
@@ -863,7 +863,8 @@ void FormEditorData::print()
}
const QSizeF pixmapSize = pixmap.size();
printer->setOrientation( pixmapSize.width() > pixmapSize.height() ? QPrinter::Landscape : QPrinter::Portrait);
printer->setPageOrientation(pixmapSize.width() > pixmapSize.height() ? QPageLayout::Landscape
: QPageLayout::Portrait);
// Printer parameters
QPrintDialog dialog(printer, fw);
@@ -895,7 +896,7 @@ void FormEditorData::print()
} while (false);
printer->setFullPage(oldFullPage);
printer->setOrientation(oldOrientation);
printer->setPageOrientation(oldOrientation);
}
} // namespace Internal