QCocoaPrintDevice: Compile on Mac OS 10.6
MAXPATHLEN is not defined, use PATH_MAX. Change-Id: I5a8febce66584c15bdfe81df64fe3f1954972a47 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
a3634e4b2b
commit
27ea8fa99f
@ -463,7 +463,11 @@ bool QCocoaPrintDevice::openPpdFile()
|
|||||||
ppdClose(m_ppd);
|
ppdClose(m_ppd);
|
||||||
m_ppd = 0;
|
m_ppd = 0;
|
||||||
CFURLRef ppdURL = NULL;
|
CFURLRef ppdURL = NULL;
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
|
||||||
|
char ppdPath[PATH_MAX];
|
||||||
|
#else
|
||||||
char ppdPath[MAXPATHLEN];
|
char ppdPath[MAXPATHLEN];
|
||||||
|
#endif
|
||||||
if (PMPrinterCopyDescriptionURL(m_printer, kPMPPDDescriptionType, &ppdURL) == noErr
|
if (PMPrinterCopyDescriptionURL(m_printer, kPMPPDDescriptionType, &ppdURL) == noErr
|
||||||
&& ppdURL != NULL
|
&& ppdURL != NULL
|
||||||
&& CFURLGetFileSystemRepresentation(ppdURL, true, (UInt8*)ppdPath, sizeof(ppdPath))) {
|
&& CFURLGetFileSystemRepresentation(ppdURL, true, (UInt8*)ppdPath, sizeof(ppdPath))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user