forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -326,6 +326,7 @@ void FancyToolButton::hoverOverlay(QPainter *painter, const QRect &spanRect)
|
||||
p.setPen(QPen(grad, 1.0));
|
||||
p.drawLine(borderRect.topLeft(), borderRect.topRight());
|
||||
p.drawLine(borderRect.bottomLeft(), borderRect.bottomRight());
|
||||
p.end();
|
||||
|
||||
QPixmapCache::insert(cacheKey, overlay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user