summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprintdevice.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2017-12-04 13:23:49 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2017-12-13 08:17:44 +0000
commit70f6a35c8f0b6a73f4d568532e1365cd3e8ff8dd (patch)
tree225b00919565a260eb674bb49615c4f5489abca7 /src/printsupport/kernel/qprintdevice.cpp
parente5312f9ca5d38230e397d05190e623b083724bf5 (diff)
Introduce QPrintDevice::property/setProperty
So we can access QPlatformPrintDevice internals if needed Change-Id: Ib37c5717713f37262ef12d7b61793d80f05baf4a Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/printsupport/kernel/qprintdevice.cpp')
-rw-r--r--src/printsupport/kernel/qprintdevice.cpp10
1 files changed, 10 insertions, 0 deletions
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<QPrint::ColorMode> QPrintDevice::supportedColorModes() const
return isValid() ? d->supportedColorModes() : QList<QPrint::ColorMode>();
}
+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<QMimeType> QPrintDevice::supportedMimeTypes() const
{