diff options
| author | 2025-07-17 13:26:45 +0200 | |
|---|---|---|
| committer | 2025-07-17 13:26:45 +0200 | |
| commit | 735c673d8865e3abfe1d9505af5f107306bb82d3 (patch) | |
| tree | 8337a96387dfd33bb197cac7796768e63faa9f16 /src/modules/objects/KvsObject_painter.cpp | |
| parent | KviControlCodes: fix compilation with Qt >= 6.9 (#2705) (diff) | |
| download | KVIrc-735c673d8865e3abfe1d9505af5f107306bb82d3.tar.gz KVIrc-735c673d8865e3abfe1d9505af5f107306bb82d3.tar.bz2 KVIrc-735c673d8865e3abfe1d9505af5f107306bb82d3.zip | |
Adapt to Qt 6.9 deprecations (#2706)
* Adapt to Qt 6.9 deprecations
* Windows 2019 images are no more available no github, switch to 2022
* Wordaround Qt5 missing QTimezone::UTC
Diffstat (limited to 'src/modules/objects/KvsObject_painter.cpp')
| -rw-r--r-- | src/modules/objects/KvsObject_painter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/objects/KvsObject_painter.cpp b/src/modules/objects/KvsObject_painter.cpp index 5c576ae5c..6286d13da 100644 --- a/src/modules/objects/KvsObject_painter.cpp +++ b/src/modules/objects/KvsObject_painter.cpp @@ -1554,7 +1554,18 @@ KVSO_CLASS_FUNCTION(painter, drawPixmapMirrored) sourceWH.setWidth(iW); sourceWH.setHeight(iH); } +#if (QT_VERSION < QT_VERSION_CHECK(6, 9, 0)) QImage mirrored = pImage->mirrored(bHorizontal, bVertical); +#else + Qt::Orientations orient = Qt::Orientations(); + if(bHorizontal) { + orient |= Qt::Horizontal; + } + if(bVertical) { + orient |= Qt::Vertical; + } + QImage mirrored = pImage->flipped(orient); +#endif m_pPainter->drawImage(rX, rY, mirrored, sourceXY.x(), sourceXY.y(), sourceWH.width(), sourceWH.height()); return true; } |
