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

Qt4 build fixed

This commit is contained in:
Arin Alexander
2017-04-19 02:04:14 +04:00
parent d0cf6f4961
commit 1700576394
6 changed files with 60 additions and 25 deletions

View File

@@ -274,7 +274,12 @@ bool ReportEnginePrivate::printReport(QPrinter* printer)
if (!printer&&!m_printerSelected){
QPrinterInfo pi;
if (!pi.defaultPrinter().isNull())
#ifdef HAVE_QT4
m_printer.data()->setPrinterName(pi.defaultPrinter().printerName());
#endif
#ifdef HAVE_QT5
m_printer.data()->setPrinterName(pi.defaultPrinterName());
#endif
QPrintDialog dialog(m_printer.data(),QApplication::activeWindow());
m_printerSelected = dialog.exec()!=QDialog::Rejected;
}
@@ -301,7 +306,12 @@ bool ReportEnginePrivate::printPages(ReportPages pages, QPrinter *printer, Print
if (!printer&&!m_printerSelected){
QPrinterInfo pi;
if (!pi.defaultPrinter().isNull())
#ifdef HAVE_QT4
m_printer.data()->setPrinterName(pi.defaultPrinter().printerName());
#endif
#ifdef HAVE_QT5
m_printer.data()->setPrinterName(pi.defaultPrinterName());
#endif
QPrintDialog dialog(m_printer.data(),QApplication::activeWindow());
m_printerSelected = dialog.exec()!=QDialog::Rejected;
if (m_printerSelected){