[graphics/krita] libs/pigment/tests: Fix TestColorConversionSystem
Wolthera van Hövell <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit d6e64013cc17a4caf61823b0d85f6aa6e6767408 by Wolthera van Hövell, on behalf of Dmitry Kazakov.
Committed on 16/07/2026 at 16:26.
Pushed by woltherav into branch 'master'.
Fix TestColorConversionSystem
The legacy profile should be added even when
there is an alias for that.
M +4 -2 libs/pigment/tests/TestColorConversionSystem.cpp
https://invent.kde.org/graphics/krita/-/commit/d6e64013cc17a4caf61823b0d85f6aa6e6767408
diff --git a/libs/pigment/tests/TestColorConversionSystem.cpp b/libs/pigment/tests/TestColorConversionSystem.cpp
index cc67491b86e..f4b9ef5451a 100644
--- a/libs/pigment/tests/TestColorConversionSystem.cpp
+++ b/libs/pigment/tests/TestColorConversionSystem.cpp
@@ -516,14 +516,16 @@ void TestColorConversionSystem::testRec2020PQConnectionPaths()
QFETCH(std::vector<NodeKey>, expectedPath);
auto loadExternalProfile = [](const QString &profileName, const QString &profileFileName) {
- if (!KoColorSpaceRegistry::instance()->profileByName(profileName)) {
+ const KoColorProfile *profile = KoColorSpaceRegistry::instance()->profileByName(profileName);
+ if (!profile || profile->name() != profileName) {
const QString profileFilePath = TestUtil::fetchDataFileLazy(profileFileName);
KIS_ASSERT(QFile::exists(profileFilePath));
{
KoColorSpaceEngine *iccEngine = KoColorSpaceEngineRegistry::instance()->get("icc");
KIS_ASSERT(iccEngine);
- (void)iccEngine->addProfile(profileFilePath);
+ const KoColorProfile *profile = iccEngine->addProfile(profileFilePath);
+ KIS_ASSERT(profile);
}
}
};