diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/printsupport/kernel/qplatformprintersupport_qpa.cpp | 2 | ||||
-rw-r--r-- | src/printsupport/kernel/qprinterinfo.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp index 35441df5fc..d2459dc91d 100644 --- a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp +++ b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp @@ -94,7 +94,7 @@ QPrinterInfo QPlatformPrinterSupport::defaultPrinter() if (printerInfo.isDefault()) return printerInfo; } - return printers.isEmpty() ? QPrinterInfo() : printers.front(); + return QPrinterInfo(); } QPrinterInfo QPlatformPrinterSupport::printerInfo(const QString &printerName) diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp index fbf2e4de33..dc60d7a50f 100644 --- a/src/printsupport/kernel/qprinterinfo.cpp +++ b/src/printsupport/kernel/qprinterinfo.cpp @@ -69,7 +69,12 @@ QPrinterInfoPrivate QPrinterInfoPrivate::shared_null; The return value should be checked using isNull() before being used, in case there is no default printer. + On some systems it is possible for there to be available printers + but none of them set to be the default printer. + \sa isNull() + \sa isDefault() + \sa availablePrinters() */ /*! |