summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinterinfo.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-08-17 14:20:53 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-08-19 09:16:52 +0200
commit6d2c5d9ffe255410c34edbb1c1228e68c9d745bd (patch)
tree22fab8253e9b04f489e2fd2f82dbf773551168e4 /src/printsupport/kernel/qprinterinfo.cpp
parentf4f1b53b9646288d73979f8339a90fbbbcb9eedc (diff)
Move the printer support backend into it's own plugin
QPlatformIntegration can't have a dependency onto printing anymore now that printing lives in it's own library. Move it into a plugin of it's own. Change-Id: I3ec4b38f4336eb96d92ea799544d17af359c83e1 Reviewed-on: http://codereview.qt.nokia.com/3210 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
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