diff options
author | Volker Hilsheimer <[email protected]> | 2024-12-02 10:17:47 +0100 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2024-12-02 11:36:10 +0100 |
commit | 3f1a644ee3e38a92bd7ebc31de2b77079ee4ac89 (patch) | |
tree | e3549d3daf4bf9af27ff6735897572ca6d2b9077 /src/quick/scenegraph/adaptations/software | |
parent | 31d99d270a13a07e3b86e08e18a9a97ed775fdab (diff) |
Replace deprecated QImage::mirror(ed) with flip(ped)
Follow up on change in qtbase:577946c1f05aaaa2a3f9682001aeb4144386b26b.
Task-number: QTBUG-129575
Change-Id: I5f25e98d8991fae6ddd9cc2d875bba91cdfbdd88
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp index b62474e02b..e323174177 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp @@ -101,7 +101,10 @@ void QSGSoftwareImageNode::updateCachedMirroredPixmap() mirrorTransform = mirrorTransform.scale(-1, 1); m_cachedPixmap = pt->pixmap().transformed(mirrorTransform); } else if (QSGPlainTexture *pt = qobject_cast<QSGPlainTexture *>(m_texture)) { - m_cachedPixmap = QPixmap::fromImage(pt->image().mirrored(m_transformMode.testFlag(MirrorHorizontally), m_transformMode.testFlag(MirrorVertically))); + static constexpr Qt::Orientation none = Qt::Orientation(0); + const auto orientation = (m_transformMode.testFlag(MirrorHorizontally) ? Qt::Horizontal : none) + | (m_transformMode.testFlag(MirrorVertically) ? Qt::Vertical : none); + m_cachedPixmap = QPixmap::fromImage(pt->image().flipped(orientation)); } else { m_cachedPixmap = QPixmap(); } |