https://bugs.kde.org/show_bug.cgi?id=472056
Ingo Klöcker <kloec...@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kloec...@kde.org Resolution|--- |UPSTREAM Status|REPORTED |RESOLVED --- Comment #2 from Ingo Klöcker <kloec...@kde.org> --- QAccessible::UserRole is documented as "The first value to be used for user defined roles.". Hence, we are supposed to use QAccessible::UserRole + n for user defined roles. I'm using QAccessible::UserRole + 1. Unfortunately, Qt chose 0x0000ffff as value for QAccessible::UserRole, so that all values of the QAccessible::Role enum fit into uint16 and apparently clang 16 chooses uint16 as underlying type (because the "underlying type is an implementation-defined integral type that can represent all enumerator values"). I consider this a bug in Qt. To me, Qt clearly intends QAccessible::Role as a 32-bit enum (apparent from the 32-bit hex notation used for the enum values) and therefore needs to state int (or unsigned int) explicitly as underlying type of QAccessible::Role: ``` enum Role { NoRole = 0x00000000, TitleBar = 0x00000001, MenuBar = 0x00000002, ``` https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/qaccessible_base.h This is related to bug https://bugreports.qt.io/browse/QTBUG-64962 which was closed as invalid without addressing the issue that compilers can choose smaller underlying types than (seemingly) intended by Qt. -- You are receiving this mail because: You are watching all bug changes.