QIcon: Avoid fetching twice the same pixmap

Looks like something went through the reviewer's eyes. This commit
amends 6ec9b34cbb.

Change-Id: I59a05361b1cbdf4e5177821d958766ffe3218f16
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-06-27 20:01:05 +02:00 committed by The Qt Project
parent 93e79d865c
commit 971bdc90e9

View File

@ -181,7 +181,7 @@ void QPixmapIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode
{
QSize pixmapSize = rect.size() * qt_effective_device_pixel_ratio(0);
QPixmap px = pixmap(pixmapSize, mode, state);
painter->drawPixmap(rect, pixmap(pixmapSize, mode, state));
painter->drawPixmap(rect, px);
}
static inline int area(const QSize &s) { return s.width() * s.height(); }