summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinterinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/printsupport/kernel/qprinterinfo.cpp')
-rw-r--r--src/printsupport/kernel/qprinterinfo.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp
index e48db449b5..5be73e76b9 100644
--- a/src/printsupport/kernel/qprinterinfo.cpp
+++ b/src/printsupport/kernel/qprinterinfo.cpp
@@ -30,7 +30,7 @@
#ifndef QT_NO_PRINTER
-#include <private/qguiapplication_p.h>
+#include "qplatformprintplugin_qpa.h"
#include <QtPrintSupport/QPlatformPrinterSupport>
QT_BEGIN_NAMESPACE
@@ -176,7 +176,7 @@ QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
{
const Q_D(QPrinterInfo);
if (!isNull() && !d->hasPaperSizes) {
- d->paperSizes = QGuiApplicationPrivate::platformIntegration()->printerSupport()->supportedPaperSizes(*this);
+ d->paperSizes = QPlatformPrinterSupportPlugin::get()->supportedPaperSizes(*this);
d->hasPaperSizes = true;
}
return d->paperSizes;
@@ -184,12 +184,18 @@ QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
QList<QPrinterInfo> QPrinterInfo::availablePrinters()
{
- return QGuiApplicationPrivate::platformIntegration()->printerSupport()->availablePrinters();
+ QPlatformPrinterSupport *ps = QPlatformPrinterSupportPlugin::get();
+ if (!ps)
+ return QList<QPrinterInfo>();
+ return ps->availablePrinters();
}
QPrinterInfo QPrinterInfo::defaultPrinter()
{
- return QGuiApplicationPrivate::platformIntegration()->printerSupport()->defaultPrinter();
+ QPlatformPrinterSupport *ps = QPlatformPrinterSupportPlugin::get();
+ if (!ps)
+ return QPrinterInfo();
+ return QPlatformPrinterSupportPlugin::get()->defaultPrinter();
}
#endif //Q_WS_QPA