diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-17 10:35:28 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-10-17 10:35:28 +0200 |
commit | ccf26f6a88e116abdf8e53acdc02dbd98a4a8dc4 (patch) | |
tree | 40aaca99471edc709d38e6f82153576bad86747f /src/printsupport | |
parent | 8ff1ae89bfa32c586e3b44b71dfc49d294a3e043 (diff) | |
parent | 3eebadc1734463afa469dcd08eab8c5d2557dec6 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
src/plugins/platformthemes/platformthemes.pro
src/printsupport/kernel/qplatformprintdevice.cpp
Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
Diffstat (limited to 'src/printsupport')
-rw-r--r-- | src/printsupport/kernel/qplatformprintdevice.cpp | 8 | ||||
-rw-r--r-- | src/printsupport/kernel/qplatformprintdevice.h | 8 | ||||
-rw-r--r-- | src/printsupport/kernel/qprintdevice.cpp | 8 | ||||
-rw-r--r-- | src/printsupport/kernel/qprintdevice_p.h | 2 |
4 files changed, 15 insertions, 11 deletions
diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp index 23a92fc2a1..69d984cb0c 100644 --- a/src/printsupport/kernel/qplatformprintdevice.cpp +++ b/src/printsupport/kernel/qplatformprintdevice.cpp @@ -62,7 +62,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 { @@ -363,10 +363,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 { @@ -391,13 +392,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) { diff --git a/src/printsupport/kernel/qplatformprintdevice.h b/src/printsupport/kernel/qplatformprintdevice.h index d95a5add9b..64723db92e 100644 --- a/src/printsupport/kernel/qplatformprintdevice.h +++ b/src/printsupport/kernel/qplatformprintdevice.h @@ -58,7 +58,9 @@ #include <QtCore/qvariant.h> #include <QtCore/qvector.h> +#if QT_CONFIG(mimetype) #include <QtCore/qmimetype.h> +#endif #include <QtGui/qpagelayout.h> @@ -125,7 +127,7 @@ public: virtual bool setProperty(QPrintDevice::PrintDevicePropertyKey key, const QVariant &value); virtual bool isFeatureAvailable(QPrintDevice::PrintDevicePropertyKey key, const QVariant ¶ms) const; -#ifndef QT_NO_MIMETYPE +#if QT_CONFIG(mimetype) virtual QList<QMimeType> supportedMimeTypes() const; #endif @@ -139,7 +141,7 @@ protected: virtual void loadOutputBins() const; virtual void loadDuplexModes() const; virtual void loadColorModes() const; -#ifndef QT_NO_MIMETYPE +#if QT_CONFIG(mimetype) virtual void loadMimeTypes() const; #endif @@ -178,7 +180,7 @@ protected: mutable bool m_haveColorModes; mutable QVector<QPrint::ColorMode> m_colorModes; -#ifndef QT_NO_MIMETYPE +#if QT_CONFIG(mimetype) mutable bool m_haveMimeTypes; mutable QList<QMimeType> m_mimeTypes; #endif diff --git a/src/printsupport/kernel/qprintdevice.cpp b/src/printsupport/kernel/qprintdevice.cpp index 50fc14169d..7fca3e45bf 100644 --- a/src/printsupport/kernel/qprintdevice.cpp +++ b/src/printsupport/kernel/qprintdevice.cpp @@ -260,12 +260,12 @@ bool QPrintDevice::isFeatureAvailable(PrintDevicePropertyKey key, const QVariant return isValid() ? d->isFeatureAvailable(key, params) : false; } -#ifndef QT_NO_MIMETYPE +#if QT_CONFIG(mimetype) QList<QMimeType> QPrintDevice::supportedMimeTypes() const { return isValid() ? d->supportedMimeTypes() : QList<QMimeType>(); } -#endif // QT_NO_MIMETYPE +#endif // mimetype # ifndef QT_NO_DEBUG_STREAM void QPrintDevice::format(QDebug debug) const @@ -296,7 +296,7 @@ void QPrintDevice::format(QDebug debug) const debug << "), defaultResolution=" << defaultResolution() << ", defaultDuplexMode=" << defaultDuplexMode() << ", defaultColorMode="<< defaultColorMode(); -# ifndef QT_NO_MIMETYPE +# if QT_CONFIG(mimetype) const QList<QMimeType> mimeTypes = supportedMimeTypes(); if (!mimeTypes.isEmpty()) { debug << ", supportedMimeTypes=("; @@ -304,7 +304,7 @@ void QPrintDevice::format(QDebug debug) const debug << " \"" << mimeType.name() << '"'; debug << ')'; } -# endif // !QT_NO_MIMETYPE +# endif // mimetype } else { debug << "null"; } diff --git a/src/printsupport/kernel/qprintdevice_p.h b/src/printsupport/kernel/qprintdevice_p.h index 562ccd2057..a2b18f08cf 100644 --- a/src/printsupport/kernel/qprintdevice_p.h +++ b/src/printsupport/kernel/qprintdevice_p.h @@ -139,7 +139,7 @@ public: bool setProperty(PrintDevicePropertyKey key, const QVariant &value); bool isFeatureAvailable(PrintDevicePropertyKey key, const QVariant ¶ms) const; -#ifndef QT_NO_MIMETYPE +#if QT_CONFIG(mimetype) QList<QMimeType> supportedMimeTypes() const; #endif |