From 5d78dd12ba339f8c3f300a6eae7df382d297a2c9 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. Conflicts resolved in cherry-pick: - The emoji-data code didn't exist in this branch Task-number: QTBUG-132902 Pick-to: 6.5 Change-Id: I963c57c34479041911c1364a1100d04998bdfaed Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira (cherry picked from commit 62685375a2d71fa34015faac76f03e709e4217c7) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 09b06a740dd5e2ea08b49f76a2c384e6eb6fa6c6) --- 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 fb308b7dc0..737f7a89bd 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1000,12 +1000,12 @@ 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 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;