diff options
author | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-07 17:31:22 +0300 |
---|---|---|
committer | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-25 17:17:57 +0300 |
commit | ea6c0374359415f3dd4331fab3e5e5245d9cae84 (patch) | |
tree | 9e73831dd3f211cf3dc5ac04ec998c9274ede289 /src/printsupport | |
parent | b86b415337640c1ca85405b61d98021eeb646363 (diff) |
qprintengine_mac: use const methods more
to avoid implicit detach
Change-Id: I033a5083e259c3c90b061c28b3e1b76e2f2cd33f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/printsupport')
-rw-r--r-- | src/printsupport/platform/macos/qprintengine_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printsupport/platform/macos/qprintengine_mac.mm b/src/printsupport/platform/macos/qprintengine_mac.mm index 031f5b3146..1e6ca5ba26 100644 --- a/src/printsupport/platform/macos/qprintengine_mac.mm +++ b/src/printsupport/platform/macos/qprintengine_mac.mm @@ -219,9 +219,9 @@ void QMacPrintEnginePrivate::initialize() if (!resolutions.isEmpty() && mode != QPrinter::ScreenResolution) { std::sort(resolutions.begin(), resolutions.end()); if (resolutions.count() > 1 && mode == QPrinter::HighResolution) - resolution.hRes = resolution.vRes = resolutions.last(); + resolution.hRes = resolution.vRes = resolutions.constLast(); else - resolution.hRes = resolution.vRes = resolutions.first(); + resolution.hRes = resolution.vRes = resolutions.constFirst(); if (resolution.hRes == 0) resolution.hRes = resolution.vRes = 600; } else { |