[Development] Volunteer wanted: update use of CUPS API

Thiago Macieira thiago.macieira at intel.com
Sun May 3 03:35:01 CEST 2020


We have plenty of warnings when building the CUPS plugin to QtPrintSupport 
about deprecated methods. See attached.

Any volunteers to go fix this?
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products
-------------- next part --------------
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:71:35: warning: 'cupsGetPPD' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            const char *ppdFile = cupsGetPPD(m_cupsName);
                                  ^
/usr/include/cups/ppd.h:358:65: note: 'cupsGetPPD' has been explicitly marked deprecated here
extern const char *cupsGetPPD(const char *name) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                                ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:73:25: warning: 'ppdOpenFile' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
                m_ppd = ppdOpenFile(ppdFile);
                        ^
/usr/include/cups/ppd.h:389:70: note: 'ppdOpenFile' has been explicitly marked deprecated here
extern ppd_file_t *ppdOpenFile(const char *filename) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                                     ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:77:17: warning: 'ppdMarkDefaults' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
                ppdMarkDefaults(m_ppd);
                ^
/usr/include/cups/ppd.h:384:62: note: 'ppdMarkDefaults' has been explicitly marked deprecated here
extern void ppdMarkDefaults(ppd_file_t *ppd) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                             ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:78:17: warning: 'cupsMarkOptions' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
                cupsMarkOptions(m_ppd, m_cupsDest->num_options, m_cupsDest->options);
                ^
/usr/include/cups/ppd.h:362:102: note: 'cupsMarkOptions' has been explicitly marked deprecated here
extern int cupsMarkOptions(ppd_file_t *ppd, int num_options, cups_option_t *options) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                                                                     ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:79:17: warning: 'ppdLocalize' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
                ppdLocalize(m_ppd);
                ^
/usr/include/cups/ppd.h:434:57: note: 'ppdLocalize' has been explicitly marked deprecated here
extern int ppdLocalize(ppd_file_t *ppd) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:109:9: warning: 'ppdClose' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppdClose(m_ppd);
        ^
/usr/include/cups/ppd.h:364:55: note: 'ppdClose' has been explicitly marked deprecated here
extern void ppdClose(ppd_file_t *ppd) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                      ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:149:31: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    ppd_option_t *pageSizes = ppdFindOption(m_ppd, "PageSize");
                              ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:152:41: warning: 'ppdPageSize' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            const ppd_size_t *ppdSize = ppdPageSize(m_ppd, pageSizes->choices[i].choice);
                                        ^
/usr/include/cups/ppd.h:393:33: note: 'ppdPageSize' has been explicitly marked deprecated here
                __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:174:35: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "PageSize");
                                  ^
/usr/include/cups/ppd.h:379:41: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
                        __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:176:31: warning: 'ppdPageSize' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_size_t *ppdSize = ppdPageSize(m_ppd, defaultChoice->choice);
                              ^
/usr/include/cups/ppd.h:393:33: note: 'ppdPageSize' has been explicitly marked deprecated here
                __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:207:33: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    ppd_option_t *resolutions = ppdFindOption(m_ppd, "Resolution");
                                ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:217:23: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        resolutions = ppdFindOption(m_ppd, "DefaultResolution");
                      ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:226:23: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        resolutions = ppdFindOption(m_ppd, "HPPrintQuality");
                      ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:236:23: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        resolutions = ppdFindOption(m_ppd, "DefaultHPPrintQuality");
                      ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:249:32: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    ppd_option_t *resolution = ppdFindOption(m_ppd, "DefaultResolution");
                               ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:256:35: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "Resolution");
                                  ^
/usr/include/cups/ppd.h:379:41: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
                        __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:263:18: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    resolution = ppdFindOption(m_ppd, "DefaultHPPrintQuality");
                 ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:269:21: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
    defaultChoice = ppdFindMarkedChoice(m_ppd, "HPPrintQuality");
                    ^
/usr/include/cups/ppd.h:379:41: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
                        __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:289:36: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *inputSlots = ppdFindOption(m_ppd, "InputSlot");
                                   ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:297:26: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            inputSlots = ppdFindOption(m_ppd, "DefaultInputSlot");
                         ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:313:35: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *inputSlot = ppdFindOption(m_ppd, "DefaultInputSlot");
                                  ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:317:39: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "InputSlot");
                                      ^
/usr/include/cups/ppd.h:379:41: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
                        __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:330:36: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *outputBins = ppdFindOption(m_ppd, "OutputBin");
                                   ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:338:26: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            outputBins = ppdFindOption(m_ppd, "DefaultOutputBin");
                         ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:354:35: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *outputBin = ppdFindOption(m_ppd, "DefaultOutputBin");
                                  ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:358:39: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "OutputBin");
                                      ^
/usr/include/cups/ppd.h:379:41: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
                        __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:372:37: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *duplexModes = ppdFindOption(m_ppd, "Duplex");
                                    ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:376:21: warning: 'ppdInstallableConflict' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
                if (ppdInstallableConflict(m_ppd, duplexModes->keyword, duplexModes->choices[i].choice) == 0) {
                    ^
/usr/include/cups/ppd.h:458:29: note: 'ppdInstallableConflict' has been explicitly marked deprecated here
            __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                            ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:383:27: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            duplexModes = ppdFindOption(m_ppd, "DefaultDuplex");
                          ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:384:33: warning: 'ppdInstallableConflict' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            if (duplexModes && (ppdInstallableConflict(m_ppd, duplexModes->keyword, duplexModes->choices[0].choice) == 0)) {
                                ^
/usr/include/cups/ppd.h:458:29: note: 'ppdInstallableConflict' has been explicitly marked deprecated here
            __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                            ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:402:35: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *inputSlot = ppdFindOption(m_ppd, "DefaultDuplex");
                                  ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:406:39: warning: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_choice_t *defaultChoice = ppdFindMarkedChoice(m_ppd, "Duplex");
                                      ^
/usr/include/cups/ppd.h:379:41: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
                        __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                        ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:434:36: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
        ppd_option_t *colorModel = ppdFindOption(m_ppd, "DefaultColorModel");
                                   ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:436:26: warning: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            colorModel = ppdFindOption(m_ppd, "ColorModel");
                         ^
/usr/include/cups/ppd.h:381:35: note: 'ppdFindOption' has been explicitly marked deprecated here
                  __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                  ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:464:13: warning: 'ppdMarkOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            ppdMarkOption(m_ppd, values[0].toLatin1(), values[1].toLatin1());
            ^
/usr/include/cups/ppd.h:386:54: note: 'ppdMarkOption' has been explicitly marked deprecated here
                 const char *option) __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                                                     ^
/home/tjmaciei/src/qt/qt5/qtbase/src/plugins/printsupport/cups/qppdprintdevice.cpp:477:20: warning: 'ppdInstallableConflict' is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
            return ppdInstallableConflict(m_ppd, values[0].toLatin1(), values[1].toLatin1());
                   ^
/usr/include/cups/ppd.h:458:29: note: 'ppdInstallableConflict' has been explicitly marked deprecated here
            __attribute__ ((deprecated("Use cupsCopyDestInfo and friends instead."))) __attribute__ ((visibility("default")));
                            ^
36 warnings generated.


More information about the Development mailing list