summaryrefslogtreecommitdiffstats
path: root/src/gui/doc
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/doc
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/doc')
-rw-r--r--src/gui/doc/snippets/droparea.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/doc/snippets/droparea.cpp b/src/gui/doc/snippets/droparea.cpp
index 13cf540d5e..ff77a1609e 100644
--- a/src/gui/doc/snippets/droparea.cpp
+++ b/src/gui/doc/snippets/droparea.cpp
@@ -127,10 +127,10 @@ void DropArea::clear()
QPixmap DropArea::extractPixmap(const QByteArray &data, const QString &format)
{
- QList<QByteArray> imageFormats = QImageReader::supportedImageFormats();
+ const QList<QByteArray> imageFormats = QImageReader::supportedImageFormats();
QPixmap pixmap;
- foreach (const QByteArray &imageFormat, imageFormats) {
+ for (const QByteArray &imageFormat : imageFormats) {
if (format.mid(6) == QString(imageFormat)) {
pixmap.loadFromData(data, imageFormat);
break;