summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs/qprintdialog_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/printsupport/dialogs/qprintdialog_mac.mm')
-rw-r--r--src/printsupport/dialogs/qprintdialog_mac.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_mac.mm b/src/printsupport/dialogs/qprintdialog_mac.mm
index 33a11cc079..ef3e88be39 100644
--- a/src/printsupport/dialogs/qprintdialog_mac.mm
+++ b/src/printsupport/dialogs/qprintdialog_mac.mm
@@ -160,13 +160,13 @@ QT_USE_NAMESPACE
PMOrientation orientation;
PMGetOrientation(pageFormat, &orientation);
QPageSize pageSize;
- QCFString key;
+ CFStringRef key;
double width = 0;
double height = 0;
// If the PPD name is empty then is custom, for some reason PMPaperIsCustom doesn't work here
PMPaperGetPPDPaperName(paper, &key);
if (PMPaperGetWidth(paper, &width) == noErr && PMPaperGetHeight(paper, &height) == noErr) {
- QString ppdKey = key;
+ QString ppdKey = QString::fromCFString(key);
if (ppdKey.isEmpty()) {
// Is using a custom page size as defined in the Print Dialog custom settings using mm or inches.
// We can't ask PMPaper what those units actually are, we can only get the point size which may return
@@ -185,7 +185,7 @@ QT_USE_NAMESPACE
pageSize = QPageSize(QSizeF(w / 100.0, h / 100.0), QPageSize::Inch);
}
} else {
- pageSize = QPlatformPrintDevice::createPageSize(key, QSize(width, height), QString());
+ pageSize = QPlatformPrintDevice::createPageSize(ppdKey, QSize(width, height), QString());
}
}
if (pageSize.isValid() && !pageSize.isEquivalentTo(printer->pageLayout().pageSize()))