summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authoraavit <qt_aavit@ovi.com>2012-04-18 16:15:41 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-27 10:37:02 +0200
commit56d4d97852b37d9d1ca73d5b7f85e3865912f3db (patch)
tree10d56ebfb8a5d67eca374c3b93302b5580f1d948 /src/gui/image
parent878a01b2d1ca819e24cda04c9baa2417c53a1215 (diff)
Fix workaround for image readers that can scale but not clip
If both scaling and clipping was requested from an image reader that only supports scaling, the code failed to apply the intended workaround (i.e. read normal and do clipping and scaling afterwards). Ref. the comment just above about "Only enable the ScaledSize option if ..." Change-Id: I273edba60bf9f785f2082aa8f236505ec3ce0776 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimagereader.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 870784f638..fe14a45dcb 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1197,11 +1197,7 @@ bool QImageReader::read(QImage *image)
}
}
} else {
- if (d->handler->supportsOption(QImageIOHandler::ScaledSize) && d->scaledSize.isValid()) {
- // in this case, there's nothing we can do. if the
- // plugin supports scaled size but not ClipRect, then
- // we have to ignore ClipRect."
-
+ if (d->handler->supportsOption(QImageIOHandler::ScaledSize) && d->scaledSize.isValid() && d->clipRect.isNull()) {
if (d->handler->supportsOption(QImageIOHandler::ScaledClipRect) && !d->scaledClipRect.isNull()) {
// nothing to do (ClipRect is ignored!)
} else {