Skip to content

armgit / krita

Public Imported from GitHub
0

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 qt5 build by using qmin correctly.

Wolthera van Hövell tot Westerflier7e5cdfd39e42
diff --git a/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp b/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp
index 059c85ce14..298d0d34ce 100644
--- a/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp
+++ b/plugins/color/colorspaceextensions/kis_gamutmap_clip_adjustment.cpp
@@ -170,12 +170,12 @@ public:
const float t = (L - cuspL) / (1.0 - cuspL);
const float c = qMax(0.0, cusp.x()* (1.0-t));
- LCH[1] = qMin(LCH[1], c);
+ LCH[1] = qMin(LCH[1], qreal(c));
} else {
const float t = L / (cuspL);
const float c = qMax(0.0, cusp.x()*t);
- LCH[1] = qMin(LCH[1], c);
+ LCH[1] = qMin(LCH[1], qreal(c));
}
originalChannels = ModelType::fromLCH(LCH, originalChannels);
m_sourceSpace->fromNormalisedChannelsValue(tmpOriginal.get(), originalChannels);