Details
-
Technical task
-
Resolution: Fixed
-
P3: Somewhat important
-
cebb3a732041d4254e8fd1a0b41e19f027351e92
Description
Currently, only generate_As() does QMetaObject::cast() and the special conversion of matching type to either the type itself or undefined.
While the latter is indeed quite specific to the "as" operation, using QMetaObject::cast() could be done to downcast any QObject-based type in any conversion.
Furthermore, if we can statically prove that the "as" operation doesn't do anything because the source type already inherits the target type, we don't have to generate any code at all.