diff options
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r-- | src/gui/painting/qpdf.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 13dc7f7dd9..84e18a64dd 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1078,9 +1078,8 @@ void QPdfEngine::updateState(const QPaintEngineState &state) } else if (flags & DirtyClipRegion) { d->clipEnabled = true; QPainterPath path; - QVector<QRect> rects = state.clipRegion().rects(); - for (int i = 0; i < rects.size(); ++i) - path.addRect(rects.at(i)); + for (const QRect &rect : state.clipRegion()) + path.addRect(rect); updateClipPath(path, state.clipOperation()); flags |= DirtyClipPath; } else if (flags & DirtyClipEnabled) { @@ -2097,7 +2096,7 @@ int QPdfEnginePrivate::generateLinearGradientShader(const QLinearGradient *gradi break; case QGradient::ReflectSpread: reflect = true; - // fall through + Q_FALLTHROUGH(); case QGradient::RepeatSpread: { // calculate required bounds QRectF pageRect = m_pageLayout.fullRectPixels(resolution); @@ -2160,7 +2159,7 @@ int QPdfEnginePrivate::generateRadialGradientShader(const QRadialGradient *gradi break; case QGradient::ReflectSpread: reflect = true; - // fall through + Q_FALLTHROUGH(); case QGradient::RepeatSpread: { Q_ASSERT(qFuzzyIsNull(r0)); // QPainter emulates if this is not 0 |