Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
4.8.4, 5.0.0 RC 1
-
None
Description
Low prio but would probably be such a tiny fix in qt source and would greatly simplify our code.
The problem is that some of the enums in qt5/qtbase/src/corelib/global/qnamespace.h are not declared with Q_ENUMS.
This means that, for example, they are not exposed to qml. We can, for example, say in qml:
Qt.Key_Backspace Qt.Key_C
(because there is "Q_ENUMS(Key)" in qnamespace.h), but trying to say
Qt.ShiftModifier
ends up with an error. This means that we basically end up with a number of new enums in our qml, which then can be used e.g. in calls to our c++ functions which ... map them back to qt enum to call qt functions (such as KeyEvent constructor).
Not a huge problem but duplicated enums and the mapping in our code would not be needed if only qt source contained "Q_ENUMS(KeyboardModifier)" (and similar declarations for other enums).