Changeset View
Changeset View
Standalone View
Standalone View
lib/imagescaler.cpp
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 122 | if (d->mZoom < Document::maxDownSampledZoom()) { | |||
---|---|---|---|---|---|
126 | } | 126 | } | ||
127 | } else if (d->mDocument->image().isNull()) { | 127 | } else if (d->mDocument->image().isNull()) { | ||
128 | LOG("Asked for the full image"); | 128 | LOG("Asked for the full image"); | ||
129 | d->mDocument->startLoadingFullImage(); | 129 | d->mDocument->startLoadingFullImage(); | ||
130 | return; | 130 | return; | ||
131 | } | 131 | } | ||
132 | 132 | | |||
133 | LOG("Starting"); | 133 | LOG("Starting"); | ||
134 | Q_FOREACH(const QRect & rect, d->mRegion.rects()) { | 134 | for (const QRect &rect : qAsConst(d->mRegion)) { | ||
meven: Wrap d->mRegion in qAsConst(d->mRegion)
https://www.kdab.com/goodbye-q_foreach/ | |||||
135 | LOG(rect); | 135 | LOG(rect); | ||
136 | scaleRect(rect); | 136 | scaleRect(rect); | ||
137 | } | 137 | } | ||
138 | LOG("Done"); | 138 | LOG("Done"); | ||
139 | } | 139 | } | ||
140 | 140 | | |||
141 | void ImageScaler::scaleRect(const QRect& rect) | 141 | void ImageScaler::scaleRect(const QRect& rect) | ||
142 | { | 142 | { | ||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
Wrap d->mRegion in qAsConst(d->mRegion)
https://www.kdab.com/goodbye-q_foreach/