summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaprintdevice.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaprintdevice.mm8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
index 7605dc9d1a..ab304d9c04 100644
--- a/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
+++ b/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
@@ -37,6 +37,8 @@
**
****************************************************************************/
+#include <ApplicationServices/ApplicationServices.h>
+
#include "qcocoaprintdevice.h"
#if QT_CONFIG(mimetype)
@@ -44,6 +46,8 @@
#endif
#include <qdebug.h>
+#include <QtCore/private/qcore_mac_p.h>
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PRINTER
@@ -117,7 +121,7 @@ QCocoaPrintDevice::~QCocoaPrintDevice()
{
if (m_ppd)
ppdClose(m_ppd);
- foreach (PMPaper paper, m_macPapers)
+ for (PMPaper paper : m_macPapers)
PMRelease(paper);
// Releasing the session appears to also release the printer
if (m_session)
@@ -171,7 +175,7 @@ QPageSize QCocoaPrintDevice::createPageSize(const PMPaper &paper) const
void QCocoaPrintDevice::loadPageSizes() const
{
m_pageSizes.clear();
- foreach (PMPaper paper, m_macPapers)
+ for (PMPaper paper : m_macPapers)
PMRelease(paper);
m_macPapers.clear();
m_printableMargins.clear();