summaryrefslogtreecommitdiff
path: root/client/macrowindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r--client/macrowindow.cc45
1 files changed, 1 insertions, 44 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc
index 6837e1d..e3d4846 100644
--- a/client/macrowindow.cc
+++ b/client/macrowindow.cc
@@ -130,50 +130,7 @@ bool MacroWindow::doCommit()
if(faulty == 0) {
printf("MacroWindow -> committing...\n");
-#if 0
- // Build the XML commit
- QString xml_string;
- xml_string.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- xml_string.append("<pracro version=\"1.0\" cpr=\"" + cpr + "\" user=\"" + user + "\">\n");
- xml_string.append(" <commit macro=\"" + macro + "\" version=\"" +
- version + "\">\n");
-
- // Iterate the different entries, and append their results to the commit string
- QVector< Widget* >::iterator i = widgets.begin();
- while (i != widgets.end()) {
- Widget* w = *i;
-
- xml_string.append(" <field name=\"" + w->getName()
- + "\" value=\"" + w->getValue() + "\"/>\n");
- i++;
- }
-
- xml_string.append(" </commit>\n");
- xml_string.append("</pracro>\n");
-
- // Print commit to stdout for debug purposes
- printf("%s\n", xml_string.toStdString().c_str());
-
- // Convert the commit to Utf-8 charset
- QByteArray xml_array = xml_string.toUtf8();
- QDomDocument xml_result;
-
- // Use setContent of QDomDocument to validate the xml commit
- if (!xml_result.setContent(xml_array)) {
- printf("Parse error: Invalid XML\n");
- }
-
- // Commit the xml data to the server
- SendRecieve macro_commit(host, port);
- macro_commit.makeConnection(&xml_result);
- // Recieve answer from server whether successful or not
- //QByteArray ba = macro_commit.getResult();
- QString ba = macro_commit.getResult();
- printf("Server returned result: %s", ba.toStdString().c_str());
-#endif/*0*/
-
- NetCom netcom(host, port, user, cpr);
- netcom.send(widgets, macro, version);
+ Global::netcom->send(widgets, macro, version);
return true;
} else {