Skip to content

gobject: Don’t warn when setting deprecated construct property defaults

The default values for construct properties always have to be set, even if those properties are deprecated. The code to do that is in GLib, and not under the control of the user (unless they completely override the constructor vfunc, which is not recommended). So don’t emit a warning for that if G_ENABLE_DIAGNOSTICS is enabled.

In particular, this fixes deprecation warnings being emitted for properties of a parent class when chaining up with a custom constructor, even when none of the child class code mentions the deprecated property.

Signed-off-by: Philip Withnall

Fixes: #3254

Closes #3254

Merge request reports