summaryrefslogtreecommitdiffstats
path: root/src/core/pdfium_printing_wrapper_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/pdfium_printing_wrapper_qt.cpp')
-rw-r--r--src/core/pdfium_printing_wrapper_qt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/pdfium_printing_wrapper_qt.cpp b/src/core/pdfium_printing_wrapper_qt.cpp
index 165ac743f..fceb381af 100644
--- a/src/core/pdfium_printing_wrapper_qt.cpp
+++ b/src/core/pdfium_printing_wrapper_qt.cpp
@@ -139,7 +139,9 @@ PdfiumPrintingWrapperQt::PdfiumPrintingWrapperQt(const void *pdfData, size_t siz
bool PdfiumPrintingWrapperQt::printOnPrinter(QPrinter &printer)
{
if (!m_documentHandle || !m_pageCount) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
qWarning("Failure to print on printer %ls: invalid document.\n", qUtf16Printable(printer.printerName()));
+#endif
return false;
}
@@ -172,7 +174,9 @@ bool PdfiumPrintingWrapperQt::printOnPrinter(QPrinter &printer)
QPainter painter;
if (!painter.begin(&printer)) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
qWarning("Failure to print on printer %ls: Could not open printer for painting.\n", qUtf16Printable(printer.printerName()));
+#endif
return false;
}