Commit 31520970 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

Qt 4.5 compile fix

parent e15806db
...@@ -30,7 +30,11 @@ void HandCounter::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op ...@@ -30,7 +30,11 @@ void HandCounter::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
painter->save(); painter->save();
QSize translatedSize = painter->combinedTransform().mapRect(boundingRect()).size().toSize(); QSize translatedSize = painter->combinedTransform().mapRect(boundingRect()).size().toSize();
QPixmap cachedPixmap; QPixmap cachedPixmap;
#if QT_VERSION >= 0x040600
if (!QPixmapCache::find("handCounter" + QString::number(translatedSize.width()), &cachedPixmap)) { 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")); QSvgRenderer svg(QString(":/resources/hand.svg"));
cachedPixmap = QPixmap(translatedSize); cachedPixmap = QPixmap(translatedSize);
cachedPixmap.fill(Qt::transparent); cachedPixmap.fill(Qt::transparent);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment