mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Fix QImage::mirrored deprecation warning (#5792)
This commit is contained in:
parent
0e7d7ffcb2
commit
2a3b9a9a5e
1 changed files with 4 additions and 0 deletions
|
|
@ -140,7 +140,11 @@ void PictureLoader::imageLoaded(CardInfoPtr card, const QImage &image)
|
|||
QPixmapCache::insert(card->getPixmapCacheKey(), QPixmap());
|
||||
} else {
|
||||
if (card->getUpsideDownArt()) {
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 9, 0))
|
||||
QImage mirrorImage = image.flipped(Qt::Horizontal | Qt::Vertical);
|
||||
#else
|
||||
QImage mirrorImage = image.mirrored(true, true);
|
||||
#endif
|
||||
QPixmapCache::insert(card->getPixmapCacheKey(), QPixmap::fromImage(mirrorImage));
|
||||
} else {
|
||||
QPixmapCache::insert(card->getPixmapCacheKey(), QPixmap::fromImage(image));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue