From 70f6a35c8f0b6a73f4d568532e1365cd3e8ff8dd Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 4 Dec 2017 13:23:49 +0100 Subject: Introduce QPrintDevice::property/setProperty So we can access QPlatformPrintDevice internals if needed Change-Id: Ib37c5717713f37262ef12d7b61793d80f05baf4a Reviewed-by: Liang Qi --- src/printsupport/kernel/qprintdevice.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/printsupport/kernel/qprintdevice.cpp') diff --git a/src/printsupport/kernel/qprintdevice.cpp b/src/printsupport/kernel/qprintdevice.cpp index 26799a6f13..7096f5a2f6 100644 --- a/src/printsupport/kernel/qprintdevice.cpp +++ b/src/printsupport/kernel/qprintdevice.cpp @@ -245,6 +245,16 @@ QList QPrintDevice::supportedColorModes() const return isValid() ? d->supportedColorModes() : QList(); } +QVariant QPrintDevice::property(PrintDevicePropertyKey key) const +{ + return isValid() ? d->property(key) : QVariant(); +} + +bool QPrintDevice::setProperty(PrintDevicePropertyKey key, const QVariant &value) +{ + return isValid() ? d->setProperty(key, value) : false; +} + #ifndef QT_NO_MIMETYPE QList QPrintDevice::supportedMimeTypes() const { -- cgit v1.2.3