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++

Qt6: Use float for QColor api calss

Halla Rempt1af781975768
diff --git a/plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp b/plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp
index af893dc8af..8c79a4bf2c 100644
--- a/plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp
+++ b/plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp
@@ -66,7 +66,11 @@ KoResourceSP KisMyPaintPaintOpPreset::clone() const
void KisMyPaintPaintOpPreset::setColor(const KoColor color, const KoColorSpace *colorSpace) {
float hue, saturation, value;
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
qreal r = 0, g = 0, b = 0;
+#else
+ float r = 0, g = 0, b = 0;
+#endif
QColor dstColor;
if (colorSpace->colorModelId() == RGBAColorModelID) {