commit:     37122dbfb44f6ebeb5b87056aaf96bd3414bea20
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  5 16:20:00 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Dec  5 16:20:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37122dbf

media-libs/kimageannotator: Fix AnnotationAreaTest

Thanks-to: David Flogeras <dflogeras2 <AT> gmail.com>
Closes: https://bugs.gentoo.org/966772
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kimageannotator-0.7.2-testfix.patch      | 22 ++++++++++++++++++++++
 .../kimageannotator/kimageannotator-0.7.2.ebuild   |  1 +
 2 files changed, 23 insertions(+)

diff --git 
a/media-libs/kimageannotator/files/kimageannotator-0.7.2-testfix.patch 
b/media-libs/kimageannotator/files/kimageannotator-0.7.2-testfix.patch
new file mode 100644
index 000000000000..6e756c0df4cc
--- /dev/null
+++ b/media-libs/kimageannotator/files/kimageannotator-0.7.2-testfix.patch
@@ -0,0 +1,22 @@
+From 7eedc8975fe447761fee7c2ec591e7024ee57520 Mon Sep 17 00:00:00 2001
+From: dflogeras <[email protected]>
+Date: Mon, 1 Dec 2025 05:29:47 -0400
+Subject: [PATCH] Explicitly set test image format to match resultImage. (#345)
+
+---
+ tests/annotations/core/AnnotationAreaTest.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/annotations/core/AnnotationAreaTest.cpp 
b/tests/annotations/core/AnnotationAreaTest.cpp
+index 9833d8f..8d1ff85 100644
+--- a/tests/annotations/core/AnnotationAreaTest.cpp
++++ b/tests/annotations/core/AnnotationAreaTest.cpp
+@@ -61,7 +61,7 @@ void 
AnnotationAreaTest::ExportAsImage_Should_ExportUnscaledImage_When_ScalingEn
+ 
+       auto resultImage = annotationArea.image();
+ 
+-      QCOMPARE(resultImage, pixmap.toImage());
++      QCOMPARE(resultImage, 
pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied));
+ }
+ 
+ void AnnotationAreaTest::AddAnnotationItem_Should_AddAnnotationItemToScene()

diff --git a/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild 
b/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild
index 73147e614b82..5595b652b008 100644
--- a/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild
+++ b/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild
@@ -39,6 +39,7 @@ PATCHES=(
        # Pending upstream fix, bug #965014:
        "${FILESDIR}/${P}-cmake-minreqver-3.16.patch"
        "${FILESDIR}/${PN}-0.7.1-cmake-cleanup.patch"
+       "${FILESDIR}/${P}-testfix.patch" # git master, bug #966772
 )
 
 src_configure() {

Reply via email to