diff options
authorTor Arne Vestbø <>2017-11-03 13:40:48 +0100
committerTor Arne Vestbø <>2017-11-08 00:55:27 +0000
commitf1aa2ee512ef9a06bc2a86b080d6ba3864f46539 (patch)
parent7646f182956e7fc5b5cf0a3c5e624115a07310a4 (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 Task-number: QTBUG-56545 Change-Id: Ia308ae1e8064dc046745350b0be3992d02f2b760 Reviewed-by: Andy Shaw <> Reviewed-by: Morten Johan Sørvig <>
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/ b/src/plugins/platforms/cocoa/
index 39fcf285ed..bfe6cd09b6 100644
--- a/src/plugins/platforms/cocoa/
+++ b/src/plugins/platforms/cocoa/
@@ -46,6 +46,15 @@ QT_BEGIN_NAMESPACE
+// 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
+#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