QRect r = rect;
bool doPixmapCache = painter->deviceTransform().isIdentity()
- && painter->worldMatrix().isIdentity();
+ && painter->worldMatrix().isIdentity();
if (doPixmapCache && QPixmapCache::find(gradientName, cache)) {
painter->drawPixmap(rect, cache);
} else {
cache = QPixmap(rect.size());
cache.fill(Qt::transparent);
p = new QPainter(&cache);
- r = QRect(0, 0, rect.width(), rect.height());
+ r = QRect(0, 0, rect.width(), rect.height());
}
int x = r.center().x();
p->fillRect(r, gradient);
if (doPixmapCache) {
- p->end();
- delete p;
- painter->drawPixmap(rect, cache);
+ p->end();
+ delete p;
+ painter->drawPixmap(rect, cache);
QPixmapCache::insert(gradientName, cache);
- }
+ }
}
}