Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix the filter mask test
Maciej Jesionowskic44fe44236f7
diff --git a/libs/image/tests/kis_filter_mask_test.cpp b/libs/image/tests/kis_filter_mask_test.cppindex 7f916017f6..a1e7617522 100644--- a/libs/image/tests/kis_filter_mask_test.cpp+++ b/libs/image/tests/kis_filter_mask_test.cpp@@ -88,7 +88,12 @@ void KisFilterMaskTest::testProjectionSelected()mask->initSelection(layer);mask->select(qimage.rect(), MAX_SELECTED);mask->apply(projection, qimage.rect(), qimage.rect(), KisNode::N_FILTHY, KisRenderPassFlag::None);- QCOMPARE(mask->exactBounds(), QRect(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT));++ if (f->needsTransparentPixels(kfc, image->colorSpace())) {+ QCOMPARE(mask->exactBounds(), QRect(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT));+ } else {+ QVERIFY2(mask->exactBounds().contains(layer->exactBounds()), "The mask bounds are smaller than the layer bounds");+ }QPoint errpoint;if (!TestUtil::compareQImages(errpoint, inverted, projection->convertToQImage(0, 0, 0, qimage.width(), qimage.height()))) {