sdbus++: property: fix up enum type ambiguity
Adding a variant[enum[...]] to the test/server/Test.interface.yaml
yields a compile failure due to enumeration type ambiguity:
builddir/test/server/Test/server.cpp:1022:47: error: ‘server’ is not a
member of ‘sdbusplus::server::server’
std::variant<std::string, server::server::Test::EnumOne,
server::server::Test::EnumTwo>>());
Fix this ambiguity by properly adding the fully-qualified type name
in the type generation for enumerations. ie. add the 'sdbusplus::'
prepending.
Tested: Compiled the test-change encountering the problem and the
full phosphor-dbus-interface repository with this change as a
subproject.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I186792c0a440711b1254489d8d066ef04c7732b8
diff --git a/tools/sdbusplus/property.py b/tools/sdbusplus/property.py
index e0c8fed..1cea3da 100644
--- a/tools/sdbusplus/property.py
+++ b/tools/sdbusplus/property.py
@@ -66,6 +66,7 @@
iface = interface.split(".")
iface.insert(-1, ns_type)
iface = "::".join(iface)
+ iface = "sdbusplus::" + iface
r = cppTypeName