From 1676c032b9e539d474c210ae153540c8430d5bad Mon Sep 17 00:00:00 2001 From: Sebastian Hoogen Date: Tue, 10 Mar 2015 17:22:11 +0100 Subject: [PATCH] properly cast to unsigned before the shift --- src/Gui/PrefWidgets.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/PrefWidgets.cpp b/src/Gui/PrefWidgets.cpp index 3404edefd..ead1e0cef 100644 --- a/src/Gui/PrefWidgets.cpp +++ b/src/Gui/PrefWidgets.cpp @@ -447,8 +447,9 @@ void PrefColorButton::savePreferences() QColor col = color(); // (r,g,b,a) with a = 255 (opaque) - unsigned long lcol = (col.red() << 24) | (col.green() << 16) | (col.blue() << 8) | 255; - + unsigned long lcol = (static_cast (col.red()) << 24) + | (static_cast (col.green()) << 16) + | (static_cast (col.blue()) << 8) | 255; getWindowParameter()->SetUnsigned( entryName(), lcol ); }