From 03fde36cda3b20de7cbc3f54547a140e5d807997 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Mon, 26 Aug 2013 15:52:27 -0500 Subject: [PATCH] Fix incorrect generated C++ template code This resolves Bug 1604 --- tools/dbusxml2qt3/methodgen.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/dbusxml2qt3/methodgen.cpp b/tools/dbusxml2qt3/methodgen.cpp index cf7929c..8fe0741 100644 --- a/tools/dbusxml2qt3/methodgen.cpp +++ b/tools/dbusxml2qt3/methodgen.cpp @@ -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 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 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";