mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Qt 4.5 compile fix
This commit is contained in:
parent
e15806db34
commit
3152097084
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue