diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-06 12:25:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-08 11:33:01 +0000 |
commit | ce088cb754331104b07f16020abcb99172b01f55 (patch) | |
tree | 722993904d02f3c0df7ae3ed2a72acb14d932564 /src/libs/utils/stylehelper.cpp | |
parent | 148e793dec13e62cce022022826402ac4ea60eb5 (diff) |
Call QPainter::end() prior to QPixmapCache::insert()
Inserting a QPixmap with active painters on it causes it to
do a deep copy of it, which is unnecessary.
Task-number: QTBUG-58653
Change-Id: I49123ffcec2e12a01c87974b7a513d68a11185d4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/utils/stylehelper.cpp')
-rw-r--r-- | src/libs/utils/stylehelper.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 088b7ff5154..93c7125e055 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -455,6 +455,7 @@ void StyleHelper::drawIconWithShadow(const QIcon &icon, const QRect &rect, // Draw the actual pixmap... cachePainter.drawPixmap(QRect(QPoint(radius, radius) + offset, QSize(px.width(), px.height())), px); + cachePainter.end(); cache.setDevicePixelRatio(devicePixelRatio); QPixmapCache::insert(pixmapName, cache); } |