From 3152097084c9639c5233396298b4095cb4b9b06c Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Mon, 13 Sep 2010 16:35:16 +0200 Subject: [PATCH] Qt 4.5 compile fix --- cockatrice/src/handcounter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cockatrice/src/handcounter.cpp b/cockatrice/src/handcounter.cpp index 7ff9bf53..aa1f9ce1 100644 --- a/cockatrice/src/handcounter.cpp +++ b/cockatrice/src/handcounter.cpp @@ -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);