diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-11-03 13:40:48 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-11-08 00:55:27 +0000 |
commit | f1aa2ee512ef9a06bc2a86b080d6ba3864f46539 (patch) | |
tree | 0c9eb011519aa4084cd65cc9cf8b5e32534e4a2b /src/plugins | |
parent | 7646f182956e7fc5b5cf0a3c5e624115a07310a4 (diff) |
macOS: Disable CUPS PPD deprecation warnings for QCocoaPrintDevice
We're not going to rewrite this code until we can also share the rewrite
with QPpdPrintDevice, which can only happen once we drop support for
RHEL 6, which still ships CUPS 1.4.
Until then, silence these deprecation warnings so that they don't add
noise to other potential build warnings/issues. This matches the
approach taken by Chromium in crbug.com/622493.
Task-number: QTBUG-56545
Change-Id: Ia308ae1e8064dc046745350b0be3992d02f2b760
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaprintdevice.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm index 39fcf285ed..bfe6cd09b6 100644 --- a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm +++ b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm @@ -46,6 +46,15 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_PRINTER +// The CUPS PPD APIs were deprecated in CUPS 1.6/macOS 10.8, but +// as long as we're supporting RHEL 6, which still ships CUPS 1.4 +// we're not going to rewrite this, as we want to share the code +// between macOS and Linux for the CUPS-bits. See discussion in +// https://bugreports.qt.io/browse/QTBUG-56545 +#pragma message "Disabling CUPS PPD deprecation warnings. This should be fixed once we drop support for RHEL6 (QTBUG-56545)" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + static QPrint::DuplexMode macToDuplexMode(const PMDuplexMode &mode) { if (mode == kPMDuplexTumble) @@ -474,6 +483,8 @@ PMPaper QCocoaPrintDevice::macPaper(const QPageSize &pageSize) const return paper; } +#pragma clang diagnostic pop + #endif // QT_NO_PRINTER QT_END_NAMESPACE |