Fix QImage::mirrored deprecation warning (#5792)

This commit is contained in:
RickyRister 2025-04-05 03:21:11 -07:00 committed by GitHub
parent 0e7d7ffcb2
commit 2a3b9a9a5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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));