summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/painting/qcolor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index f0d7dd23ad..0189f4e5f1 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -72,10 +72,10 @@ public:
QColor(Qt::GlobalColor color) noexcept;
Q_DECL_CONSTEXPR QColor(int r, int g, int b, int a = 255) noexcept
: cspec(isRgbaValid(r, g, b, a) ? Rgb : Invalid),
- ct(cspec == Rgb ? a * 0x0101 : 0,
- cspec == Rgb ? r * 0x0101 : 0,
- cspec == Rgb ? g * 0x0101 : 0,
- cspec == Rgb ? b * 0x0101 : 0,
+ ct(ushort(cspec == Rgb ? a * 0x0101 : 0),
+ ushort(cspec == Rgb ? r * 0x0101 : 0),
+ ushort(cspec == Rgb ? g * 0x0101 : 0),
+ ushort(cspec == Rgb ? b * 0x0101 : 0),
0) {}
QColor(QRgb rgb) noexcept;
QColor(QRgba64 rgba64) noexcept;