qdbusxml2cpp: Fix annotation value in an introspection string generator

Unescaped annotation value causes for harmless values in an XML file, for instance,
'value=\"QList<uint>\"' a DBus exception, like
dbus.exceptions.IntrospectionParserException: Error parsing introspect data

Task-number: QTBUG-26668

Change-Id: Ie1eb519aec5228da0591d62c3aa5b6dec5790eb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Michael Krasnyk 2013-09-26 22:35:33 +03:00 committed by The Qt Project
parent f911e87345
commit bdfbc9e493

View File

@ -103,7 +103,7 @@ static bool parseAnnotation(const QXmlStreamReader &xml, QDBusIntrospection::Ann
annotations.insert(name, value);
if (!interfaceAnnotation)
ifaceData->introspection += QLatin1String(" ");
ifaceData->introspection += QLatin1String(" <annotation value=\"") + value + QLatin1String("\" name=\"") + name + QLatin1String("\"/>\n");
ifaceData->introspection += QLatin1String(" <annotation value=\"") + value.toHtmlEscaped() + QLatin1String("\" name=\"") + name + QLatin1String("\"/>\n");
return true;
}