From 4060888474e49cc0716cdd59d4d1a73c06c5b3bc Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 9 Oct 2007 08:07:55 +0000 Subject: Code cleanup and commenting --- client/macro.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'client/macro.cc') diff --git a/client/macro.cc b/client/macro.cc index bc97d1c..ec520f0 100644 --- a/client/macro.cc +++ b/client/macro.cc @@ -41,30 +41,34 @@ void macro(QString name) xml_acquire.makeConnection(&xml_req); QByteArray ba = xml_acquire.getResult(); + // Print to stdout, for debug purposes char *test = ba.data(); printf("%s\n", test); - // Parse the XML document + // Parse the XML document using setContent of QDomDocument QDomDocument xml_doc; if (!xml_doc.setContent(ba)) { printf("ERROR: Invalid XML recieved!\n"); } + // Initiate the macro builder with the xml document Builder *builder = new Builder(&xml_doc); } static QDomDocument xml_request(QString name) { - // Create the xml request document here + // Create the xml request array QByteArray xml_array; xml_array.append("\n"); xml_array.append("\n"); - xml_array.append(" \n"); + xml_array.append(" \n"); xml_array.append(""); + // Print to stdout for debug purposes char *test = xml_array.data(); printf("%s\n", test); + // Parse the XML document using setContent of QDomDocument QDomDocument xml_req; if (!xml_req.setContent(xml_array)) { printf("Error: Invalid XML found in request\n"); -- cgit v1.2.3