summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qhighdpiscaling_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-26 14:38:54 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-02-11 23:18:35 +0000
commitd09cfe04b82c1bd0738bca24def1e9c3bfdaaa4b (patch)
tree3553f876e10d7a30e75c488ede82c4a09db8e03e /src/gui/kernel/qhighdpiscaling_p.h
parent257cc69bedebf924bcabf0ff24e237b8705260ad (diff)
QtGui: eradicate Q_FOREACH loops [already const]
(or trivially marked const) ... by replacing them with C++11 range-for loops. Change-Id: I3cce92b9d77a3ff96fad877d1d989145e530646f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling_p.h')
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
index 8540460a54..50fb4d73ea 100644
--- a/src/gui/kernel/qhighdpiscaling_p.h
+++ b/src/gui/kernel/qhighdpiscaling_p.h
@@ -454,7 +454,7 @@ QVector<T> fromNativePixels(const QVector<T> &pixelValues, const QWindow *window
return pixelValues;
QVector<T> pointValues;
- foreach (const T& pixelValue, pixelValues)
+ for (const T &pixelValue : pixelValues)
pointValues.append(pixelValue / QHighDpiScaling::factor(window));
return pointValues;
}
@@ -467,7 +467,7 @@ QVector<T> toNativePixels(const QVector<T> &pointValues, const QWindow *window)
return pointValues;
QVector<T> pixelValues;
- foreach (const T& pointValue, pointValues)
+ for (const T &pointValue : pointValues)
pixelValues.append(pointValue * QHighDpiScaling::factor(window));
return pixelValues;
}