summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qplatformprintdevice.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-09-28 11:40:10 +0200
committerLiang Qi <liang.qi@qt.io>2018-10-12 14:26:33 +0000
commit3eebadc1734463afa469dcd08eab8c5d2557dec6 (patch)
tree939afe7c3da0ff7249c6ae7f167dd56442401f51 /src/printsupport/kernel/qplatformprintdevice.cpp
parent9c8ca26a4829d5ce810c9653fec3dfe48717f0b1 (diff)
Modernize the "mimetype" feature
Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/printsupport/kernel/qplatformprintdevice.cpp')
-rw-r--r--src/printsupport/kernel/qplatformprintdevice.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp
index 8dba402a6e..8c905889db 100644
--- a/src/printsupport/kernel/qplatformprintdevice.cpp
+++ b/src/printsupport/kernel/qplatformprintdevice.cpp
@@ -61,7 +61,7 @@ QPlatformPrintDevice::QPlatformPrintDevice()
m_haveOutputBins(false),
m_haveDuplexModes(false),
m_haveColorModes(false)
-#ifndef QT_NO_MIMETYPE
+#if QT_CONFIG(mimetype)
, m_haveMimeTypes(false)
#endif
{
@@ -79,7 +79,7 @@ QPlatformPrintDevice::QPlatformPrintDevice(const QString &id)
m_haveOutputBins(false),
m_haveDuplexModes(false),
m_haveColorModes(false)
-#ifndef QT_NO_MIMETYPE
+#if QT_CONFIG(mimetype)
, m_haveMimeTypes(false)
#endif
{
@@ -376,10 +376,11 @@ QVector<QPrint::ColorMode> QPlatformPrintDevice::supportedColorModes() const
return m_colorModes;
}
-#ifndef QT_NO_MIMETYPE
+#if QT_CONFIG(mimetype)
void QPlatformPrintDevice::loadMimeTypes() const
{
}
+#endif // mimetype
QVariant QPlatformPrintDevice::property(QPrintDevice::PrintDevicePropertyKey key) const
{
@@ -404,13 +405,14 @@ bool QPlatformPrintDevice::isFeatureAvailable(QPrintDevice::PrintDevicePropertyK
return false;
}
+#if QT_CONFIG(mimetype)
QList<QMimeType> QPlatformPrintDevice::supportedMimeTypes() const
{
if (!m_haveMimeTypes)
loadMimeTypes();
return m_mimeTypes;
}
-#endif // QT_NO_MIMETYPE
+#endif // mimetype
QPageSize QPlatformPrintDevice::createPageSize(const QString &key, const QSize &size, const QString &localizedName)
{