Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6, 5.7, 5.8
-
None
Description
The PPD CUPS API that we use was deprecated in CUPS 1.6/macOS 10.8. Not sure what the situation is for QPpdPrintDevice which I assume we use on Linux/other UNIXes.
/Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:92:41: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *collate = ppdFindOption(m_ppd, "Collate"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:108:9: warning: 'ppdClose' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppdClose(m_ppd); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:370:14: note: 'ppdClose' has been explicitly marked deprecated here extern void ppdClose(ppd_file_t *ppd) _PPD_DEPRECATED; ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:264:36: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *inputSlots = ppdFindOption(m_ppd, "InputSlot"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:271:26: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] inputSlots = ppdFindOption(m_ppd, "DefaultInputSlot"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:288:35: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *inputSlot = ppdFindOption(m_ppd, "DefaultInputSlot"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:292:39: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "InputSlot"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:383:22: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:306:36: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *outputBins = ppdFindOption(m_ppd, "OutputBin"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:313:26: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] outputBins = ppdFindOption(m_ppd, "DefaultOutputBin"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:330:35: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *outputBin = ppdFindOption(m_ppd, "DefaultOutputBin"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:334:39: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "OutputBin"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:383:22: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:349:37: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *duplexModes = ppdFindOption(m_ppd, "Duplex"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:356:27: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] duplexModes = ppdFindOption(m_ppd, "DefaultDuplex"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:402:36: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppd_option_t *colorModel = ppdFindOption(m_ppd, "DefaultColorModel"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:404:26: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] colorModel = ppdFindOption(m_ppd, "ColorModel"); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:386:22: note: 'ppdFindOption' has been explicitly marked deprecated here extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:436:9: warning: 'ppdClose' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] ppdClose(m_ppd); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:370:14: note: 'ppdClose' has been explicitly marked deprecated here extern void ppdClose(ppd_file_t *ppd) _PPD_DEPRECATED; ^ /Users/torarne/dev/qt/5.x/qtbase/src/plugins/platforms/cocoa/qcocoaprintdevice.mm:443:21: warning: 'ppdOpenFile' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations] m_ppd = ppdOpenFile(ppdPath); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/cups/ppd.h:395:20: note: 'ppdOpenFile' has been explicitly marked deprecated here extern ppd_file_t *ppdOpenFile(const char *filename) _PPD_DEPRECATED; ^ 16 warnings generated.
If QCocoaPrintDevice needs to fall back to CUPS for some parts, it would probably be a good idea to have QCocoaPrintDevice subclass QPpdPrintDevice or share implementation somehow, instead of having comments with
// NOTE: Implemented in both CUPS and Mac plugins, please keep in sync
all around.