From 09b06a740dd5e2ea08b49f76a2c384e6eb6fa6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 20 Jan 2025 15:38:05 +0100 Subject: [PATCH] Unicode tool: use unsigned values for the bitfields On MSVC the values stored end up as negative. Task-number: QTBUG-132902 Pick-to: 6.8 6.5 Change-Id: I963c57c34479041911c1364a1100d04998bdfaed Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira (cherry picked from commit 62685375a2d71fa34015faac76f03e709e4217c7) Reviewed-by: Qt Cherry-pick Bot --- util/unicode/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 73e29807ef6..fb5709c046b 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1047,14 +1047,14 @@ struct PropertyFlags { } // from UnicodeData.txt uchar combiningClass : 8; - QChar::Category category : 5; - QChar::Direction direction : 5; + uchar category : 5; // QChar::Category, but unsigned + uchar direction : 5; // QChar::Direction, but unsigned // from emoji-data.txt uchar emojiFlags : 5; // from ArabicShaping.txt - QChar::JoiningType joining : 3; + uchar joining : 3; // QChar::JoiningType, but unsigned // from DerivedAge.txt - QChar::UnicodeVersion age : 5; + uchar age : 5; // QChar::UnicodeVersion, but unsigned // From EastAsianWidth.txt EastAsianWidth eastAsianWidth = EastAsianWidth::N; int digitValue = -1;