diff options
Diffstat (limited to 'src/printsupport/kernel/qprinter.cpp')
-rw-r--r-- | src/printsupport/kernel/qprinter.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index dba2d77b8d..10c4c681ba 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -129,6 +129,11 @@ QList<const QPicture *> QPrinterPrivate::previewPages() const return QList<const QPicture *>(); } +bool QPrinterPrivate::previewMode() const +{ + return (previewEngine != nullptr) && (previewEngine == printEngine); +} + void QPrinterPrivate::setPreviewMode(bool enable) { Q_Q(QPrinter); @@ -431,7 +436,7 @@ public: Note the difference between Point and DevicePixel. The Point unit is defined to be 1/72th of an inch, while the DevicePixel unit is - resolution dependant and is based on the actual pixels, or dots, on + resolution dependent and is based on the actual pixels, or dots, on the printer. */ @@ -1272,7 +1277,7 @@ QPrinter::PrinterState QPrinter::printerState() const return d->printEngine->printerState(); } -#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC) +#if defined(Q_OS_WIN) || defined(Q_QDOC) /*! Returns the supported paper sizes for this printer. @@ -1410,7 +1415,8 @@ int QPrinter::toPage() const void QPrinter::setFromTo(int from, int to) { d->pageRanges.clear(); - d->pageRanges.addRange(from, to); + if (from && to) + d->pageRanges.addRange(from, to); } /*! |