Changeset 573 for trunk/src/gui/painting/qcups.cpp
- Timestamp:
- Feb 17, 2010, 8:53:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/painting/qcups.cpp
r561 r573 50 50 51 51 QT_BEGIN_NAMESPACE 52 53 #ifndef Q_WS_PM 52 54 53 55 typedef int (*CupsGetDests)(cups_dest_t **dests); … … 86 88 static CupsPrintFile _cupsPrintFile = 0; 87 89 90 #else // ifndef Q_WS_PM 91 92 // On OS/2, we link to libcups statically 93 94 static bool cupsLoaded = false; 95 static int qt_cups_num_printers = 0; 96 97 #define _cupsGetDests cupsGetDests 98 #define _cupsFreeDests cupsFreeDests 99 #define _cupsGetPPD cupsGetPPD 100 #define _cupsLangGet cupsLangGet 101 #define _cupsLangEncoding cupsLangEncoding 102 #define _ppdOpenFile ppdOpenFile 103 #define _ppdMarkDefaults ppdMarkDefaults 104 #define _ppdClose ppdClose 105 #define _cupsMarkOptions cupsMarkOptions 106 #define _ppdMarkOption ppdMarkOption 107 #define _cupsFreeOptions cupsFreeOptions 108 #define _cupsSetDests cupsSetDests 109 #define _cupsAddOption cupsAddOption 110 #define _cupsTempFd cupsTempFd 111 #define _cupsPrintFile cupsPrintFile 112 113 #endif // ifndef Q_WS_PM 114 88 115 static void resolveCups() 89 116 { 117 #ifndef Q_WS_PM 90 118 QLibrary cupsLib(QLatin1String("cups"), 2); 91 119 if(cupsLib.load()) { … … 107 135 108 136 if (_cupsGetDests && _cupsFreeDests) { 137 #endif 109 138 cups_dest_t *printers; 110 139 int num_printers = _cupsGetDests(&printers); … … 112 141 _cupsFreeDests(num_printers, printers); 113 142 qt_cups_num_printers = num_printers; 114 } 115 } 143 #ifndef Q_WS_PM 144 } 145 } 146 #endif 116 147 cupsLoaded = true; 117 148 } … … 218 249 resolveCups(); 219 250 220 return _cupsGetDests && 251 return 252 #ifndef Q_WS_PM 253 _cupsGetDests && 221 254 _cupsFreeDests && 222 255 _cupsGetPPD && … … 231 264 _cupsLangEncoding && 232 265 _cupsAddOption && 266 #endif 233 267 (qt_cups_num_printers > 0); 234 268 }
Note:
See TracChangeset
for help on using the changeset viewer.