StyleKitReader: emit style property changes on componentComplete
Style properties can be read from a StyleReader before it has been
completed, e.g. by the bindings of a control while it's being created.
At that point, the reader's own state (controlType, checked, hovered,
etc.) may not yet be fully initialized, so the values read can be
wrong. And since updateControl() is a no-op until m_completed is true,
and nothing was emitted from componentComplete(), state changes that
arrived after resetReadersForStyle() were never propagated. Bindings
could therefore be left with stale values based on the initial, and
wrong, state.
This patch fixes this by letting setCompleted() rebuild the effective
font and palette, and emit change signals for all style properties.
This forces any premature reads to be re-evaluated against the reader's
final state.
As a consequence, the reader is now added to s_allReaders on completion
rather than from the constructor, so that style and theme changes only
affect completed readers. For the same reason, onPaletteChanged() now
returns early until the reader is completed.
Pick-to: 6.12
Change-Id: I0fbe25fb598bc96b850f7c5a6cbdb6282a2ac278
Reviewed-by: Doris Verria <doris.verria@qt.io>