diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-04-01 14:55:56 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-04-14 15:54:22 +0200 |
commit | c2efc16126a9706d83f8b80133d46342baaa3265 (patch) | |
tree | 23106f183aa5965637bf4aaa73b81e9aab3caec1 /src/plugins/platforms/cocoa/qprintengine_mac.mm | |
parent | 9ba09e26d7fc667355d48a7d26361be6fb20612d (diff) |
macOS: Replace foreach with ranged for loops
Change-Id: I9d0dbb60e05e4ef85219740465bb941ef8d8eb0f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qprintengine_mac.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qprintengine_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qprintengine_mac.mm b/src/plugins/platforms/cocoa/qprintengine_mac.mm index dcb9a85a3c..5833d097fd 100644 --- a/src/plugins/platforms/cocoa/qprintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qprintengine_mac.mm @@ -485,7 +485,7 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va int bestResolution = 0; int dpi = value.toInt(); int bestDistance = INT_MAX; - foreach (int resolution, d->m_printDevice->supportedResolutions()) { + for (int resolution : d->m_printDevice->supportedResolutions()) { if (dpi == resolution) { bestResolution = resolution; break; @@ -758,7 +758,7 @@ QVariant QMacPrintEngine::property(PrintEnginePropertyKey key) const } case PPK_SupportedResolutions: { QList<QVariant> list; - foreach (int resolution, d->m_printDevice->supportedResolutions()) + for (int resolution : d->m_printDevice->supportedResolutions()) list << resolution; ret = list; break; |