From ea6c0374359415f3dd4331fab3e5e5245d9cae84 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Thu, 7 Sep 2023 17:31:22 +0300 Subject: [PATCH] qprintengine_mac: use const methods more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to avoid implicit detach Change-Id: I033a5083e259c3c90b061c28b3e1b76e2f2cd33f Reviewed-by: Edward Welbourne Reviewed-by: MÃ¥rten Nordheim --- src/printsupport/platform/macos/qprintengine_mac.mm | 4 ++-- 1 file 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 {