summaryrefslogtreecommitdiff
path: root/client/netcom.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/netcom.cc')
-rw-r--r--client/netcom.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/client/netcom.cc b/client/netcom.cc
index 9056ec3..a606c62 100644
--- a/client/netcom.cc
+++ b/client/netcom.cc
@@ -48,8 +48,8 @@
#endif
#endif
-//#define DEBUG(fmt...) printf(fmt)
-#define DEBUG(ftm...)
+#define DEBUG(fmt...) printf(fmt)
+//#define DEBUG(ftm...)
NetCom::NetCom(QString host, quint16 port)
{
@@ -192,15 +192,17 @@ QDomDocument NetCom::send(QVector< Widget* > widgets, QString templ,
// the commit string
QVector< Widget* >::iterator i = widgets.begin();
while (i != widgets.end()) {
- Widget* w = *i;
-
- if(w->enabled() && w->name() != "" && w->local() == false) {
- QDomElement field_elem = doc.createElement("field");
- field_elem.setAttribute("name", w->name());
- field_elem.setAttribute("value", w->value());
- commit_elem.appendChild(field_elem);
+ if(*i) {
+ Widget* w = *i;
+ DEBUG("W: %s: %s\n", w->name().toStdString().c_str(),
+ w->value().toStdString().c_str());
+ if(w->enabled() && w->name() != "" && w->local() == false) {
+ QDomElement field_elem = doc.createElement("field");
+ field_elem.setAttribute("name", w->name());
+ field_elem.setAttribute("value", w->value());
+ commit_elem.appendChild(field_elem);
+ }
}
-
i++;
}