0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-24 16:18:04 +03:00

QT_VERSION < 0x060000 -> (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))

page order has been fixed when TOC page is present and some pages are not printable
This commit is contained in:
Alexander Arin
2021-12-16 00:13:39 +03:00
parent 37b929459b
commit c7eec9160d
30 changed files with 360 additions and 108 deletions

View File

@@ -32,7 +32,7 @@
#include <QPrinterInfo>
#include <QMessageBox>
#include <QApplication>
#if QT_VERSION < 0x060000
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
#include <QDesktopWidget>
#else
#include <QScreen>
@@ -1324,7 +1324,7 @@ ReportPages ReportEnginePrivate::renderToPages()
m_reportRender->renderPageToPages(page),
page->mixWithPriorPage() ? MixPages : AppendPages
);
} else {
} else if (page->isTOC()){
startTOCPage = result.count();
pageAfterTOCIndex = i+1;
m_reportRender->createTOCMarker(page->resetPageNumber());
@@ -1818,7 +1818,7 @@ PrintProcessor::PrintProcessor(QPrinter* printer)
bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
{
#if QT_VERSION < 0x060000
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (!m_firstPage && !m_painter->isActive()) return false;
PageDesignIntf* backupPage = dynamic_cast<PageDesignIntf*>(page->scene());
@@ -1949,7 +1949,7 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
void PrintProcessor::initPrinter(PageItemDesignIntf* page)
{
#if QT_VERSION < 0x060000
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (page->oldPrintMode()){
m_printer->setPageMargins(page->leftMargin(),
page->topMargin(),