diff options
Diffstat (limited to 'src/printsupport/kernel/qplatformprintdevice.cpp')
-rw-r--r-- | src/printsupport/kernel/qplatformprintdevice.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp index f778de8e71..3d76cad688 100644 --- a/src/printsupport/kernel/qplatformprintdevice.cpp +++ b/src/printsupport/kernel/qplatformprintdevice.cpp @@ -163,7 +163,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QPageSize &pageSize) con // e.g. Windows defines DMPAPER_11X17 and DMPAPER_TABLOID with names "11x17" and "Tabloid", but both // map to QPageSize::Tabloid / PPD Key "Tabloid" / ANSI B Tabloid if (pageSize.id() != QPageSize::Custom) { - for (const QPageSize &ps : m_pageSizes) { + for (const QPageSize &ps : qAsConst(m_pageSizes)) { if (ps.id() == pageSize.id() && ps.name() == pageSize.name()) return ps; } @@ -171,7 +171,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QPageSize &pageSize) con // Next try match on id only if not custom if (pageSize.id() != QPageSize::Custom) { - for (const QPageSize &ps : m_pageSizes) { + for (const QPageSize &ps : qAsConst(m_pageSizes)) { if (ps.id() == pageSize.id()) return ps; } @@ -186,7 +186,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(QPageSize::PageSizeId pageSize if (!m_havePageSizes) loadPageSizes(); - for (const QPageSize &ps : m_pageSizes) { + for (const QPageSize &ps : qAsConst(m_pageSizes)) { if (ps.id() == pageSizeId) return ps; } @@ -200,7 +200,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QString &pageName) const if (!m_havePageSizes) loadPageSizes(); - for (const QPageSize &ps : m_pageSizes) { + for (const QPageSize &ps : qAsConst(m_pageSizes)) { if (ps.name() == pageName) return ps; } @@ -233,7 +233,7 @@ QPageSize QPlatformPrintDevice::supportedPageSizeMatch(const QPageSize &pageSize return pageSize; // Try to find a supported page size based on point size - for (const QPageSize &ps : m_pageSizes) { + for (const QPageSize &ps : qAsConst(m_pageSizes)) { if (ps.sizePoints() == pageSize.sizePoints()) return ps; } |