From 3c199adf6c317ade446120db1cdb51b473edca57 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 18 Aug 2008 14:54:03 +0000 Subject: Rewrite of all network code, with a reusable socket. Still needs some error checking. --- client/macrowindow.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'client/macrowindow.cc') diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 551c804..6837e1d 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -25,9 +25,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "macrowindow.h" -#include "sendrecieve.h" -#include "macro.h" -#include "widgets/widget.h" + #include #include #include @@ -35,9 +33,12 @@ #include #include +#include "macro.h" +#include "widgets/widget.h" #include "widgets/window.h" #include "widgetbuilder.h" #include "lua.h" +#include "netcom.h" extern QString cpr; extern QString user; @@ -129,6 +130,7 @@ bool MacroWindow::doCommit() if(faulty == 0) { printf("MacroWindow -> committing...\n"); +#if 0 // Build the XML commit QString xml_string; xml_string.append("\n"); @@ -137,7 +139,7 @@ bool MacroWindow::doCommit() version + "\">\n"); // Iterate the different entries, and append their results to the commit string - QVector< Widget* >::iterator i=widgets.begin(); + QVector< Widget* >::iterator i = widgets.begin(); while (i != widgets.end()) { Widget* w = *i; @@ -168,6 +170,11 @@ bool MacroWindow::doCommit() //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); + return true; } else { return false; -- cgit v1.2.3