diff options
author | John Layt <jlayt@kde.org> | 2012-06-01 21:06:26 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-08 18:44:55 +0200 |
commit | 20c7fa62caad8f93e3cfa81bcbfed4b753c3e92c (patch) | |
tree | 997c954ffed2f8b924ab275c0ee14de1117fea24 /src/printsupport | |
parent | f2df9cef75bb035cacf341871406c40e39d21495 (diff) |
QtPrintSupport: Move printer list into plugin base class
Move the cached printer list from the Windows plugin into the base
class so the CUPS plugin can also use it in a subsequent commit.
Change-Id: Idf5fb7fc49b1820aad58f16e8854ab9120caa193
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Diffstat (limited to 'src/printsupport')
-rw-r--r-- | src/printsupport/kernel/qplatformprintersupport.h | 5 | ||||
-rw-r--r-- | src/printsupport/kernel/qplatformprintersupport_qpa.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/printsupport/kernel/qplatformprintersupport.h b/src/printsupport/kernel/qplatformprintersupport.h index 074405f0cd..e922b5fb25 100644 --- a/src/printsupport/kernel/qplatformprintersupport.h +++ b/src/printsupport/kernel/qplatformprintersupport.h @@ -52,11 +52,12 @@ #include <QtPrintSupport/qprinter.h> +#include <QtCore/qlist.h> + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE - #ifndef QT_NO_PRINTER class QPrintEngine; @@ -83,6 +84,8 @@ protected: static QPrinterInfo createPrinterInfo(const QString &name, const QString &description, const QString &location, const QString &makeAndModel, bool isDefault, int index); + + QList<QPrinterInfo> m_printers; }; #endif // QT_NO_PRINTER diff --git a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp index d6ffd9b7fc..0a386eafc2 100644 --- a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp +++ b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp @@ -84,7 +84,7 @@ QList<QPrinter::PaperSize> QPlatformPrinterSupport::supportedPaperSizes(const QP QList<QPrinterInfo> QPlatformPrinterSupport::availablePrinters() { - return QList<QPrinterInfo>(); + return m_printers; } QPrinterInfo QPlatformPrinterSupport::defaultPrinter() |