QtQml: Fold qualified enums into the runtime data


The type compiler replaces bindings to qualified enums, such as
"Text.AlignLeft", with their integer values. This depends on the
resolved types, and qmlcachegen cannot do it. Therefore, we currently
reconstruct the IR from units compiled by qmlcachegen and run the type
compiler on them.

Fold the enums when calculating the runtime data instead, using the
source of the binding that we retain in the compilation unit. The object
creator then applies the value instead of evaluating the binding. This
will allow us to load units compiled by qmlcachegen without running the
type compiler on them.

Drop the enum resolver of the type compiler, the IsResolvedEnum flag and
the inline enum value of bindings. The read-only property error the enum
resolver used to report is also reported by the property validator.

The preview diff doesn't have to deal with folded enums anymore. Drop
the respective test and turn the other one into a plain test for changes
in qualified enums.

Task-number: QTBUG-147816
Change-Id: I04ce21eb0faa582bc5cfdd15b117a5e193a077b1
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
commit2f7f658b2a12724c8fe0ecfe77a39b612eab2aec
parent6be17d173e447d215b4cf0c04c3988fe8e3962ad
authorUlf Hermann <ulf.hermann@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeTue, 20 Oct 2026 21:46:03 +0000