Qt 4.5 compile fix

This commit is contained in:
Max-Wilhelm Bruker 2010-09-13 16:35:16 +02:00
parent e15806db34
commit 3152097084

View file

@ -30,7 +30,11 @@ void HandCounter::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
painter->save();
QSize translatedSize = painter->combinedTransform().mapRect(boundingRect()).size().toSize();
QPixmap cachedPixmap;
#if QT_VERSION >= 0x040600
if (!QPixmapCache::find("handCounter" + QString::number(translatedSize.width()), &cachedPixmap)) {
#else
if (!QPixmapCache::find("handCounter" + QString::number(translatedSize.width()), cachedPixmap)) {
#endif
QSvgRenderer svg(QString(":/resources/hand.svg"));
cachedPixmap = QPixmap(translatedSize);
cachedPixmap.fill(Qt::transparent);