Fix incorrect generated C++ template code

This resolves Bug 1604
pull/2/head
Alexander Golubev 11 years ago committed by Timothy Pearson
parent 02a32f1493
commit 03fde36cda

@ -148,8 +148,8 @@ static bool parseDBusSignature(const TQString& signature, Argument& argument)
if (!value.subAccessor.isEmpty())
{
argument.isPrimitive = false;
argument.containerClass = "TQT_DBusDataMap<" + key.signature + ">";
argument.signature = "TQT_DBusDataMap<" + key.signature + ">";
argument.containerClass = "TQT_DBusDataMap< " + key.signature + " >";
argument.signature = "TQT_DBusDataMap< " + key.signature + " >";
argument.accessor = key.accessor + "KeyMap";
argument.forwardDeclarations.append("template <typename K> class TQT_DBusDataMap");
@ -162,9 +162,9 @@ static bool parseDBusSignature(const TQString& signature, Argument& argument)
else
{
argument.isPrimitive = false;
argument.containerClass = "TQT_DBusDataMap<" + key.signature + ">";
argument.signature = "TQMap<" + key.signature +
", " + value.signature + ">";
argument.containerClass = "TQT_DBusDataMap< " + key.signature + " >";
argument.signature = "TQMap< " + key.signature +
", " + value.signature + " >";
argument.accessor = key.accessor + "KeyMap";
argument.subAccessor = value.accessor + "Map";
@ -190,8 +190,8 @@ static bool parseDBusSignature(const TQString& signature, Argument& argument)
else
{
argument.isPrimitive = false;
argument.containerClass = "TQT_DBusDataMap<" + key.signature + ">";
argument.signature = "TQT_DBusDataMap<" + key.signature + ">";
argument.containerClass = "TQT_DBusDataMap< " + key.signature + " >";
argument.signature = "TQT_DBusDataMap< " + key.signature + " >";
argument.accessor = key.accessor + "KeyMap";
argument.forwardDeclarations.append("template <typename K> class TQT_DBusDataMap");
@ -207,10 +207,10 @@ static bool parseDBusSignature(const TQString& signature, Argument& argument)
TQString itemSignature = signature.mid(1);
Argument item;
if (parseDBusSignature(itemSignature, item))
if (parseDBusSignature(itemSignature, item) && !itemSignature.startsWith("a"))
{
argument.isPrimitive = false;
argument.signature = "TQValueList<" + item.signature + ">";
argument.signature = "TQValueList< " + item.signature + " >";
argument.accessor = "List";
argument.subAccessor = item.accessor + "List";
argument.containerClass = "TQT_DBusDataList";

Loading…
Cancel
Save