diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-15 21:23:09 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-15 21:23:09 (GMT) |
commit | eccddae15a5e675e3b72a72b10457a5e9ea340b7 (patch) | |
tree | 0296f0ebb0d18a0c87fed82387e0a564ee2b00c4 /src/gui | |
parent | 71d94529a3cf894fa11954463dc8658aed2a04fc (diff) | |
parent | fdf827381a5e27c1c4ff6e075196befe88440fb2 (diff) | |
download | Qt-eccddae15a5e675e3b72a72b10457a5e9ea340b7.zip Qt-eccddae15a5e675e3b72a72b10457a5e9ea340b7.tar.gz Qt-eccddae15a5e675e3b72a72b10457a5e9ea340b7.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Avoid an unnecessary copy in QImage::scaled().
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 4e10b5b..4f5efa1 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -3992,7 +3992,7 @@ QImage QImage::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Transf QSize newSize = size(); newSize.scale(s, aspectMode); if (newSize == size()) - return copy(); + return *this; QTransform wm = QTransform::fromScale((qreal)newSize.width() / width(), (qreal)newSize.height() / height()); QImage img = transformed(wm, mode); |