+Markus
On 15/10/25 12:54, [email protected] wrote:
From: Marc-André Lureau <[email protected]>
The link properties are not printed in "info qtree", I don't know if
this was intentional. We currently register legacy properties for
link/ptr properties, but they don't have PropertyInfo getters (only
ObjectPropertyAccessor, when using non-legacy properties)
By not registering a (unusable?) legacy property, "info qtree" can now
print the link.
Signed-off-by: Marc-André Lureau <[email protected]>
---
hw/core/qdev-properties.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index b7e8a89ba5..fe260a9670 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1143,14 +1143,13 @@ static void qdev_class_add_legacy_property(DeviceClass
*dc, const Property *prop
{
g_autofree char *name = NULL;
- /* Register pointer properties as legacy properties */
- if (!prop->info->print && prop->info->get) {
+ if (!prop->info->print) {
return;
}
name = g_strdup_printf("legacy-%s", prop->name);
object_class_property_add(OBJECT_CLASS(dc), name, "str",
- prop->info->print ? qdev_get_legacy_property : prop->info->get,
+ qdev_get_legacy_property,
NULL, NULL, (Property *)prop);
}