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>bb10
parent
7646f18295
commit
f1aa2ee512
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue