Index: trunk/tools/FlairGCS/src/CheckBox.cpp
===================================================================
--- trunk/tools/FlairGCS/src/CheckBox.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/CheckBox.cpp	(revision 269)
@@ -46,7 +46,7 @@
 void CheckBox::Reset(void) { checkbox->setChecked(checkbox_value); }
 
-void CheckBox::LoadEvent(QDomElement dom) {
+void CheckBox::LoadEvent(QDomElement *dom) {
   if (checkbox->isEnabled() == true) {
-    if (dom.attribute("value") == QString("1")) {
+    if (dom->attribute("value") == QString("1")) {
       checkbox->setChecked(true);
     } else {
Index: trunk/tools/FlairGCS/src/CheckBox.h
===================================================================
--- trunk/tools/FlairGCS/src/CheckBox.h	(revision 268)
+++ trunk/tools/FlairGCS/src/CheckBox.h	(revision 269)
@@ -23,5 +23,5 @@
   void SetUptodate(void);
   void Reset(void);
-  void LoadEvent(QDomElement dom);
+  void LoadEvent(QDomElement *dom);
 
   void ui_to_var(void);
Index: trunk/tools/FlairGCS/src/ComboBox.cpp
===================================================================
--- trunk/tools/FlairGCS/src/ComboBox.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/ComboBox.cpp	(revision 269)
@@ -28,7 +28,7 @@
 ComboBox::~ComboBox() { delete combobox; }
 
-void ComboBox::XmlEvent(QDomElement dom) {
-  if (dom.attribute("item") != "") {
-    QString item = dom.attribute("item");
+void ComboBox::XmlEvent(QDomElement *dom) {
+  if (dom->attribute("item") != "") {
+    QString item = dom->attribute("item");
     combobox->addItem(item);
     combobox->setCurrentIndex(combobox_value);
@@ -50,7 +50,7 @@
 void ComboBox::Reset(void) { combobox->setCurrentIndex(combobox_value); }
 
-void ComboBox::LoadEvent(QDomElement dom) {
+void ComboBox::LoadEvent(QDomElement *dom) {
   if (combobox->isEnabled() == true) {
-    combobox->setCurrentIndex((dom.attribute("value")).toInt());
+    combobox->setCurrentIndex((dom->attribute("value")).toInt());
   }
 }
Index: trunk/tools/FlairGCS/src/ComboBox.h
===================================================================
--- trunk/tools/FlairGCS/src/ComboBox.h	(revision 268)
+++ trunk/tools/FlairGCS/src/ComboBox.h	(revision 269)
@@ -21,8 +21,8 @@
   QComboBox *combobox;
   int combobox_value;
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   void SetUptodate(void);
   void Reset(void);
-  void LoadEvent(QDomElement dom);
+  void LoadEvent(QDomElement *dom);
 
   void ui_to_var(void);
Index: trunk/tools/FlairGCS/src/ConnectionLayout.cpp
===================================================================
--- trunk/tools/FlairGCS/src/ConnectionLayout.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/ConnectionLayout.cpp	(revision 269)
@@ -38,5 +38,6 @@
     }
 
-    ParseXml(doc.firstChildElement("root").firstChildElement());
+    QDomElement dom=doc.firstChildElement("root").firstChildElement();
+    ParseXml(&dom);
     break;
   }
@@ -83,11 +84,11 @@
 }
 
-void ConnectionLayout::LoadXml(QDomDocument to_parse) {
-  QDomElement tmp = to_parse.firstChildElement("root");
+void ConnectionLayout::LoadXml(QDomDocument *to_parse) {
+  QDomElement tmp = to_parse->firstChildElement("root");
   while (tmp.attribute("name") != name && !tmp.isNull())
-    tmp = to_parse.nextSiblingElement("root");
+    tmp = to_parse->nextSiblingElement("root");
 
   if (!tmp.isNull()) {
-    XmlWidget::LoadXml(tmp);
+    XmlWidget::LoadXml(&tmp);
   } else {
     fprintf(stderr,"%s not found in xml file \n", name.toLocal8Bit().constData());
Index: trunk/tools/FlairGCS/src/ConnectionLayout.h
===================================================================
--- trunk/tools/FlairGCS/src/ConnectionLayout.h	(revision 268)
+++ trunk/tools/FlairGCS/src/ConnectionLayout.h	(revision 269)
@@ -20,5 +20,5 @@
   void addDataRemote(DataRemote *data);
   void removeDataRemote(DataRemote *data);
-  void LoadXml(QDomDocument to_parse);
+  void LoadXml(QDomDocument *to_parse);
   QString getName();
   static QString getDocRootName(char* buf, int size);
Index: trunk/tools/FlairGCS/src/DataPlot1D.cpp
===================================================================
--- trunk/tools/FlairGCS/src/DataPlot1D.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/DataPlot1D.cpp	(revision 269)
@@ -24,11 +24,11 @@
 }
 
-void DataPlot1D::XmlEvent(QDomElement dom) {
-  if (dom.attribute("curve") != "") {
-    QString type = dom.attribute("type");
-    int r = dom.attribute("r").toInt();
-    int g = dom.attribute("g").toInt();
-    int b = dom.attribute("b").toInt();
-    QString name = dom.attribute("curve");
+void DataPlot1D::XmlEvent(QDomElement *dom) {
+  if (dom->attribute("curve") != "") {
+    QString type = dom->attribute("type");
+    int r = dom->attribute("r").toInt();
+    int g = dom->attribute("g").toInt();
+    int b = dom->attribute("b").toInt();
+    QString name = dom->attribute("curve");
     addCurve(QPen(QColor(r, g, b, 255)), name);
     datas_type.append(type);
Index: trunk/tools/FlairGCS/src/DataPlot1D.h
===================================================================
--- trunk/tools/FlairGCS/src/DataPlot1D.h	(revision 268)
+++ trunk/tools/FlairGCS/src/DataPlot1D.h	(revision 269)
@@ -19,5 +19,5 @@
 
 private:
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   bool eventFilter(QObject *, QEvent *);
   void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
Index: trunk/tools/FlairGCS/src/DataPlot2D.cpp
===================================================================
--- trunk/tools/FlairGCS/src/DataPlot2D.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/DataPlot2D.cpp	(revision 269)
@@ -104,11 +104,11 @@
 }
 
-void DataPlot2D::XmlEvent(QDomElement dom) {
-  if (dom.attribute("curve") != "") {
-    QString type = dom.attribute("type");
-    int r = dom.attribute("r").toInt();
-    int g = dom.attribute("g").toInt();
-    int b = dom.attribute("b").toInt();
-    QString name = dom.attribute("curve");
+void DataPlot2D::XmlEvent(QDomElement *dom) {
+  if (dom->attribute("curve") != "") {
+    QString type = dom->attribute("type");
+    int r = dom->attribute("r").toInt();
+    int g = dom->attribute("g").toInt();
+    int b = dom->attribute("b").toInt();
+    QString name = dom->attribute("curve");
     addCurve(QPen(QColor(r, g, b, 255)), name, type);
   } else {
Index: trunk/tools/FlairGCS/src/DataPlot2D.h
===================================================================
--- trunk/tools/FlairGCS/src/DataPlot2D.h	(revision 268)
+++ trunk/tools/FlairGCS/src/DataPlot2D.h	(revision 269)
@@ -31,5 +31,5 @@
 private:
   QwtPlot *plot;
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   void alignScales(void);
   void plot_data(double data_x, double data_y, int index);
Index: trunk/tools/FlairGCS/src/DataRemote.cpp
===================================================================
--- trunk/tools/FlairGCS/src/DataRemote.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/DataRemote.cpp	(revision 269)
@@ -88,7 +88,7 @@
 int DataRemote::ReceiveSize(void) { return receivesize; }
 
-void DataRemote::XmlSetup(QDomElement dom) {
-  refresh_rate = dom.attribute("period").toInt() / 1000.;
-  if (dom.attribute("enabled") == "1")
+void DataRemote::XmlSetup(QDomElement *dom) {
+  refresh_rate = dom->attribute("period").toInt() / 1000.;
+  if (dom->attribute("enabled") == "1")
     auto_refresh = true;
   else
Index: trunk/tools/FlairGCS/src/DataRemote.h
===================================================================
--- trunk/tools/FlairGCS/src/DataRemote.h	(revision 268)
+++ trunk/tools/FlairGCS/src/DataRemote.h	(revision 269)
@@ -32,5 +32,5 @@
   int receivesize;
 
-  void XmlSetup(QDomElement dom);
+  void XmlSetup(QDomElement *dom);
 
 private:
Index: trunk/tools/FlairGCS/src/DoubleSpinBox.cpp
===================================================================
--- trunk/tools/FlairGCS/src/DoubleSpinBox.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/DoubleSpinBox.cpp	(revision 269)
@@ -105,7 +105,7 @@
 }
 
-void DoubleSpinBox::LoadEvent(QDomElement dom) {
+void DoubleSpinBox::LoadEvent(QDomElement *dom) {
   if (doublespinbox->isEnabled() == true) {
-    doublespinbox->setValue((dom.attribute("value")).toDouble());
+    doublespinbox->setValue((dom->attribute("value")).toDouble());
   }
 }
Index: trunk/tools/FlairGCS/src/DoubleSpinBox.h
===================================================================
--- trunk/tools/FlairGCS/src/DoubleSpinBox.h	(revision 268)
+++ trunk/tools/FlairGCS/src/DoubleSpinBox.h	(revision 269)
@@ -25,5 +25,5 @@
   void SetUptodate(void);
   void Reset(void);
-  void LoadEvent(QDomElement dom);
+  void LoadEvent(QDomElement *dom);
   void ui_to_var(void);
   void ui_to_xml(void);
Index: trunk/tools/FlairGCS/src/Label.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Label.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/Label.cpp	(revision 269)
@@ -22,5 +22,5 @@
 Label::~Label() {}
 
-void Label::XmlEvent(QDomElement dom) {
-  label->setText(dom.attribute("value"));
+void Label::XmlEvent(QDomElement *dom) {
+  label->setText(dom->attribute("value"));
 }
Index: trunk/tools/FlairGCS/src/Label.h
===================================================================
--- trunk/tools/FlairGCS/src/Label.h	(revision 268)
+++ trunk/tools/FlairGCS/src/Label.h	(revision 269)
@@ -17,5 +17,5 @@
 
 private:
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   QLabel *label;
 };
Index: trunk/tools/FlairGCS/src/Layout.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Layout.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/Layout.cpp	(revision 269)
@@ -69,11 +69,11 @@
 QGridLayout *Layout::getQGridLayout() { return qgridlayout; }
 
-void Layout::XmlEvent(QDomElement dom) {
+void Layout::XmlEvent(QDomElement *dom) {
   XmlWidget *widget = NULL;
-  QString type = dom.tagName();
-  QString name = dom.attribute("name");
-  QString old_name = dom.attribute("old_name");
-  int row = dom.attribute("row").toInt();
-  int col = dom.attribute("col").toInt();
+  QString type = dom->tagName();
+  QString name = dom->attribute("name");
+  QString old_name = dom->attribute("old_name");
+  int row = dom->attribute("row").toInt();
+  int col = dom->attribute("col").toInt();
 
   // initially rowCount()=1 and columnCount()=1 but count()=0 !
@@ -103,5 +103,5 @@
 
   if (type == "TabWidget") {
-    int position = dom.attribute("position").toInt();
+    int position = dom->attribute("position").toInt();
     widget =
         new TabWidget(this, row, col, name, (QTabWidget::TabPosition)position);
@@ -114,18 +114,18 @@
   }
   if (type == "SpinBox") {
-    int value = dom.attribute("value").toInt();
-    QString suffix = dom.attribute("suffix");
-    int min = dom.attribute("min").toInt();
-    int max = dom.attribute("max").toInt();
-    int step = dom.attribute("step").toInt();
+    int value = dom->attribute("value").toInt();
+    QString suffix = dom->attribute("suffix");
+    int min = dom->attribute("min").toInt();
+    int max = dom->attribute("max").toInt();
+    int step = dom->attribute("step").toInt();
     widget = new SpinBox(this, row, col, name, suffix, value, min, max, step);
   }
   if (type == "DoubleSpinBox") {
-    QString value = dom.attribute("value");
-    QString suffix = dom.attribute("suffix");
-    double min = dom.attribute("min").toDouble();
-    double max = dom.attribute("max").toDouble();
-    double step = dom.attribute("step").toDouble();
-    int decimals = dom.attribute("decimals").toInt();
+    QString value = dom->attribute("value");
+    QString suffix = dom->attribute("suffix");
+    double min = dom->attribute("min").toDouble();
+    double max = dom->attribute("max").toDouble();
+    double step = dom->attribute("step").toDouble();
+    int decimals = dom->attribute("decimals").toInt();
     widget = new DoubleSpinBox(this, row, col, name, suffix, value, min, max,
                                step, decimals);
@@ -133,20 +133,20 @@
   if (type == "Vector3DSpinBox") {
     QString value[3];
-    value[0] = dom.attribute("value_x");
-    value[1] = dom.attribute("value_y");
-    value[2] = dom.attribute("value_z");
-    double min = dom.attribute("min").toDouble();
-    double max = dom.attribute("max").toDouble();
-    double step = dom.attribute("step").toDouble();
-    int decimals = dom.attribute("decimals").toInt();
+    value[0] = dom->attribute("value_x");
+    value[1] = dom->attribute("value_y");
+    value[2] = dom->attribute("value_z");
+    double min = dom->attribute("min").toDouble();
+    double max = dom->attribute("max").toDouble();
+    double step = dom->attribute("step").toDouble();
+    int decimals = dom->attribute("decimals").toInt();
     widget = new Vector3DSpinBox(this, row, col, name, value, min, max, step,
                                  decimals);
   }
   if (type == "CheckBox") {
-    int value = dom.attribute("value").toInt();
+    int value = dom->attribute("value").toInt();
     widget = new CheckBox(this, row, col, name, value);
   }
   if (type == "ComboBox") {
-    int value = dom.attribute("value").toInt();
+    int value = dom->attribute("value").toInt();
     widget = new ComboBox(this, row, col, name, value);
   }
@@ -155,8 +155,8 @@
   }
   if (type == "DataPlot1D") {
-    float ymin = dom.attribute("min").toFloat();
-    float ymax = dom.attribute("max").toFloat();
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
+    float ymin = dom->attribute("min").toFloat();
+    float ymax = dom->attribute("max").toFloat();
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
     if (enabled == 1) {
       widget = new DataPlot1D(this, row, col, name, ymin, ymax, true, period);
@@ -166,12 +166,12 @@
   }
   if (type == "DataPlot2D") {
-    float xmin = dom.attribute("xmin").toFloat();
-    float xmax = dom.attribute("xmax").toFloat();
-    float ymin = dom.attribute("ymin").toFloat();
-    float ymax = dom.attribute("ymax").toFloat();
-    QString x_name = dom.attribute("x_name");
-    QString y_name = dom.attribute("y_name");
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
+    float xmin = dom->attribute("xmin").toFloat();
+    float xmax = dom->attribute("xmax").toFloat();
+    float ymin = dom->attribute("ymin").toFloat();
+    float ymax = dom->attribute("ymax").toFloat();
+    QString x_name = dom->attribute("x_name");
+    QString y_name = dom->attribute("y_name");
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
     if (enabled == 1) {
       widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
@@ -183,11 +183,11 @@
   }
   if (type == "UsSensorPlot") {
-    float ymin = dom.attribute("ymin").toFloat();
-    float ymax = dom.attribute("ymax").toFloat();
-    QString y_name = dom.attribute("y_name");
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
-    QString type = dom.attribute("type");
-    int samples = dom.attribute("samples").toInt();
+    float ymin = dom->attribute("ymin").toFloat();
+    float ymax = dom->attribute("ymax").toFloat();
+    QString y_name = dom->attribute("y_name");
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
+    QString type = dom->attribute("type");
+    int samples = dom->attribute("samples").toInt();
     if (enabled == 1) {
       widget = new UsSensorPlot(this, row, col, name, y_name,
@@ -199,17 +199,17 @@
   }
   if (type == "RangeFinderPlot") {
-    float xmin = dom.attribute("xmin").toFloat();
-    float xmax = dom.attribute("xmax").toFloat();
-    float ymin = dom.attribute("ymin").toFloat();
-    float ymax = dom.attribute("ymax").toFloat();
-    QString x_name = dom.attribute("x_name");
-    QString y_name = dom.attribute("y_name");
-    QString data_type = dom.attribute("type");
-    float start_angle = dom.attribute("start_angle").toFloat();
-    float end_angle = dom.attribute("end_angle").toFloat();
-    uint32_t nb_samples = dom.attribute("nb_samples").toUInt();
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
-    int invert_axis = dom.attribute("invert_axis").toInt();
+    float xmin = dom->attribute("xmin").toFloat();
+    float xmax = dom->attribute("xmax").toFloat();
+    float ymin = dom->attribute("ymin").toFloat();
+    float ymax = dom->attribute("ymax").toFloat();
+    QString x_name = dom->attribute("x_name");
+    QString y_name = dom->attribute("y_name");
+    QString data_type = dom->attribute("type");
+    float start_angle = dom->attribute("start_angle").toFloat();
+    float end_angle = dom->attribute("end_angle").toFloat();
+    uint32_t nb_samples = dom->attribute("nb_samples").toUInt();
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
+    int invert_axis = dom->attribute("invert_axis").toInt();
     bool invert_axis_bool;
     if (invert_axis == 0) {
@@ -231,8 +231,8 @@
   }
   if (type == "Picture") {
-    int width = dom.attribute("width").toInt();
-    int height = dom.attribute("height").toInt();
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
+    int width = dom->attribute("width").toInt();
+    int height = dom->attribute("height").toInt();
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
     if (enabled == 1) {
       widget = new Picture(this, row, col, name, width, height, true, period);
@@ -242,12 +242,12 @@
   }
   if (type == "Map") {
-    int period = dom.attribute("period").toInt();
-    int enabled = dom.attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
+    int enabled = dom->attribute("enabled").toInt();
     int i = 0;
     QList<QtMobility::QGeoCoordinate> coordinates;
-    while (dom.hasAttribute("lat" + QString::number(i))) {
-      double latitude = dom.attribute("lat" + QString::number(i)).toDouble();
-      double longitude = dom.attribute("long" + QString::number(i)).toDouble();
-      double alt = dom.attribute("alt" + QString::number(i)).toDouble();
+    while (dom->hasAttribute("lat" + QString::number(i))) {
+      double latitude = dom->attribute("lat" + QString::number(i)).toDouble();
+      double longitude = dom->attribute("long" + QString::number(i)).toDouble();
+      double alt = dom->attribute("alt" + QString::number(i)).toDouble();
       QtMobility::QGeoCoordinate coordinate =
           QtMobility::QGeoCoordinate(latitude, longitude, alt);
@@ -272,6 +272,6 @@
     QStringList items;
     int count = 0;
-    while (dom.hasAttribute("item" + QString::number(count))) {
-      QString item = dom.attribute("item" + QString::number(count));
+    while (dom->hasAttribute("item" + QString::number(count))) {
+      QString item = dom->attribute("item" + QString::number(count));
       items.append(item);
       count++;
Index: trunk/tools/FlairGCS/src/Layout.h
===================================================================
--- trunk/tools/FlairGCS/src/Layout.h	(revision 268)
+++ trunk/tools/FlairGCS/src/Layout.h	(revision 269)
@@ -23,5 +23,5 @@
 private:
   void Constructor(QString name);
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   QGridLayout *qgridlayout;
 };
Index: trunk/tools/FlairGCS/src/ListWidget.cpp
===================================================================
--- trunk/tools/FlairGCS/src/ListWidget.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/ListWidget.cpp	(revision 269)
@@ -51,8 +51,8 @@
 }
 
-void ListWidget::XmlEvent(QDomElement dom) {
+void ListWidget::XmlEvent(QDomElement *dom) {
   isUpToDate = false;
-  if (dom.attribute("item") != "") {
-    QString item = dom.attribute("item");
+  if (dom->attribute("item") != "") {
+    QString item = dom->attribute("item");
     QListWidgetItem *widget_item = new QListWidgetItem(item);
     // new item, so the text is red
@@ -60,6 +60,6 @@
     listwidget->addItem(widget_item);
   }
-  if (dom.attribute("delete") != "") {
-    int row_to_del = dom.attribute("delete").toInt();
+  if (dom->attribute("delete") != "") {
+    int row_to_del = dom->attribute("delete").toInt();
     RemoveItemFromXml(row_to_del);
     QListWidgetItem *item_to_del = listwidget->takeItem(row_to_del);
@@ -106,5 +106,5 @@
 }
 
-void ListWidget::LoadEvent(QDomElement dom) {
+void ListWidget::LoadEvent(QDomElement *dom) {
   //function not tested
   std::cout << "FlairGCS LoadEvent" << std::endl;
@@ -114,7 +114,7 @@
     QStringList items;
     int count = 0;
-    while (dom.hasAttribute("item" + QString::number(count))) {
+    while (dom->hasAttribute("item" + QString::number(count))) {
       std::cout << "FlairGCS LoadEvent boucle" << std::endl;
-      listwidget->addItem(dom.attribute("item" + QString::number(count)));
+      listwidget->addItem(dom->attribute("item" + QString::number(count)));
       count++;
     }
Index: trunk/tools/FlairGCS/src/ListWidget.h
===================================================================
--- trunk/tools/FlairGCS/src/ListWidget.h	(revision 268)
+++ trunk/tools/FlairGCS/src/ListWidget.h	(revision 269)
@@ -72,5 +72,5 @@
    * \param[in]  dom   The dom containing the xml file.
    */
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   /**
    * \brief      Reset the widget, load the internal parameters.
@@ -83,5 +83,5 @@
    * \param[in]  dom   The dom containing the xml file.
    */
-  void LoadEvent(QDomElement dom);
+  void LoadEvent(QDomElement *dom);
   /**
    * \brief      Save the user interface variables state in the internal members.
Index: trunk/tools/FlairGCS/src/Manager.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Manager.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/Manager.cpp	(revision 269)
@@ -319,5 +319,5 @@
                 "," + QString::number(errorColumn) + ")");
       } else {
-        connections.at(i).layout->LoadXml(doc);
+        connections.at(i).layout->LoadXml(&doc);
       }
       delete file;
Index: trunk/tools/FlairGCS/src/Map.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Map.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/Map.cpp	(revision 269)
@@ -272,13 +272,13 @@
 }
 
-void Map::XmlEvent(QDomElement dom) {
-  if (dom.attribute("point") != "") {
+void Map::XmlEvent(QDomElement *dom) {
+  if (dom->attribute("point") != "") {
     receivesize += 3 * sizeof(double);
     if (mapWidget->isEnabled()) {
       Landmark *landmark = new Landmark(geoMap, QGeoCoordinate(0, 0, 0),
-                                        dom.attribute("point"), "cross");
+                                        dom->attribute("point"), "cross");
       landmark->setColor(Qt::black);
       points.append(landmark);
-      mapWidget->AddPoint(dom.attribute("point"));
+      mapWidget->AddPoint(dom->attribute("point"));
     }
   } else {
Index: trunk/tools/FlairGCS/src/Map.h
===================================================================
--- trunk/tools/FlairGCS/src/Map.h	(revision 268)
+++ trunk/tools/FlairGCS/src/Map.h	(revision 269)
@@ -56,5 +56,5 @@
   void SetUptodate(void);
   void Reset(void);
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
 
Index: trunk/tools/FlairGCS/src/Picture.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Picture.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/Picture.cpp	(revision 269)
@@ -97,3 +97,3 @@
 }
 
-void Picture::XmlEvent(QDomElement dom) { XmlSetup(dom); }
+void Picture::XmlEvent(QDomElement *dom) { XmlSetup(dom); }
Index: trunk/tools/FlairGCS/src/Picture.h
===================================================================
--- trunk/tools/FlairGCS/src/Picture.h	(revision 268)
+++ trunk/tools/FlairGCS/src/Picture.h	(revision 269)
@@ -38,5 +38,5 @@
   bool eventFilter(QObject *, QEvent *);
   void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
 };
 
Index: trunk/tools/FlairGCS/src/RangeFinderPlot.cpp
===================================================================
--- trunk/tools/FlairGCS/src/RangeFinderPlot.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/RangeFinderPlot.cpp	(revision 269)
@@ -97,5 +97,5 @@
 RangeFinderPlot::~RangeFinderPlot() { delete plot; }
 
-void RangeFinderPlot::XmlEvent(QDomElement dom) { XmlSetup(dom); }
+void RangeFinderPlot::XmlEvent(QDomElement *dom) { XmlSetup(dom); }
 
 bool RangeFinderPlot::eventFilter(QObject *o, QEvent *e) {
Index: trunk/tools/FlairGCS/src/RangeFinderPlot.h
===================================================================
--- trunk/tools/FlairGCS/src/RangeFinderPlot.h	(revision 268)
+++ trunk/tools/FlairGCS/src/RangeFinderPlot.h	(revision 269)
@@ -34,5 +34,5 @@
   void SetTriangle(uint32_t id, float length);
   QwtPlot *plot;
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   void alignScales(void);
   float xmin_orig, xmax_orig, ymin_orig, ymax_orig;
Index: trunk/tools/FlairGCS/src/SpinBox.cpp
===================================================================
--- trunk/tools/FlairGCS/src/SpinBox.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/SpinBox.cpp	(revision 269)
@@ -40,7 +40,7 @@
 void SpinBox::Reset(void) { spinbox->setValue(spinbox_value); }
 
-void SpinBox::LoadEvent(QDomElement dom) {
+void SpinBox::LoadEvent(QDomElement *dom) {
   if (spinbox->isEnabled() == true) {
-    spinbox->setValue((dom.attribute("value")).toInt());
+    spinbox->setValue((dom->attribute("value")).toInt());
   }
 }
Index: trunk/tools/FlairGCS/src/SpinBox.h
===================================================================
--- trunk/tools/FlairGCS/src/SpinBox.h	(revision 268)
+++ trunk/tools/FlairGCS/src/SpinBox.h	(revision 269)
@@ -24,5 +24,5 @@
   void SetUptodate(void);
   void Reset(void);
-  void LoadEvent(QDomElement dom);
+  void LoadEvent(QDomElement *dom);
 
   void ui_to_var(void);
Index: trunk/tools/FlairGCS/src/TabWidget.cpp
===================================================================
--- trunk/tools/FlairGCS/src/TabWidget.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/TabWidget.cpp	(revision 269)
@@ -28,8 +28,8 @@
 TabWidget::~TabWidget() {}
 
-void TabWidget::XmlEvent(QDomElement dom) {
-  QString type = dom.tagName();
-  QString name = dom.attribute("name");
-  int position = dom.attribute("position").toInt();
+void TabWidget::XmlEvent(QDomElement *dom) {
+  QString type = dom->tagName();
+  QString name = dom->attribute("name");
+  int position = dom->attribute("position").toInt();
 
   if (type == "Tab") {
Index: trunk/tools/FlairGCS/src/TabWidget.h
===================================================================
--- trunk/tools/FlairGCS/src/TabWidget.h	(revision 268)
+++ trunk/tools/FlairGCS/src/TabWidget.h	(revision 269)
@@ -22,5 +22,5 @@
 private:
   QTabWidget *tab;
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
 };
 
Index: trunk/tools/FlairGCS/src/TextEdit.cpp
===================================================================
--- trunk/tools/FlairGCS/src/TextEdit.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/TextEdit.cpp	(revision 269)
@@ -29,5 +29,5 @@
 TextEdit::~TextEdit() {}
 
-void TextEdit::XmlEvent(QDomElement dom) {
-  text->append(dom.attribute("value"));
+void TextEdit::XmlEvent(QDomElement *dom) {
+  text->append(dom->attribute("value"));
 }
Index: trunk/tools/FlairGCS/src/TextEdit.h
===================================================================
--- trunk/tools/FlairGCS/src/TextEdit.h	(revision 268)
+++ trunk/tools/FlairGCS/src/TextEdit.h	(revision 269)
@@ -22,5 +22,5 @@
   QPushButton *clear;
   QTextEdit *text;
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
 };
 
Index: trunk/tools/FlairGCS/src/UdtSocket.cpp
===================================================================
--- trunk/tools/FlairGCS/src/UdtSocket.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/UdtSocket.cpp	(revision 269)
@@ -66,4 +66,5 @@
 // disconnection of ground station
 void UdtSocket::heartbeat(void) {
+  //printf("h %s %i.%i\n",name.toLocal8Bit().constData(),QTime::currentTime().second(),QTime::currentTime().msec());
   char data = WATCHDOG_HEADER;
   quint64 sent=write(&data, 1,HEARTBEAT_TIMER,true);
@@ -161,5 +162,15 @@
     } else if(readfds==socket && num==1 && rv==1) {
       int size;
+      QTime initTime;
+      initTime.start();
       do {
+        //we are in "infinite" loop, so let the heartbeat run if needed
+        if(initTime.elapsed()>HEARTBEAT_TIMER) {
+          initTime.start();
+          //do not use error check of heartbeat() method: (otherwise, closes com too early)
+          char data = WATCHDOG_HEADER;
+          UDT::sendmsg(socket, &data, 1, HEARTBEAT_TIMER, true);
+        }
+        
         size=UDT::recvmsg(socket, buf, buf_size);
       
Index: trunk/tools/FlairGCS/src/UsSensorPlot.cpp
===================================================================
--- trunk/tools/FlairGCS/src/UsSensorPlot.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/UsSensorPlot.cpp	(revision 269)
@@ -131,5 +131,5 @@
 }
 
-void UsSensorPlot::XmlEvent(QDomElement dom) {
+void UsSensorPlot::XmlEvent(QDomElement *dom) {
   XmlSetup(dom);
 }
Index: trunk/tools/FlairGCS/src/UsSensorPlot.h
===================================================================
--- trunk/tools/FlairGCS/src/UsSensorPlot.h	(revision 268)
+++ trunk/tools/FlairGCS/src/UsSensorPlot.h	(revision 269)
@@ -31,5 +31,5 @@
 private:
   QwtPlot *plot;
-  void XmlEvent(QDomElement dom);
+  void XmlEvent(QDomElement *dom);
   void alignScales(void);
   float xmin_orig, xmax_orig, ymin_orig, ymax_orig;
Index: trunk/tools/FlairGCS/src/Vector3DSpinBox.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Vector3DSpinBox.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/Vector3DSpinBox.cpp	(revision 269)
@@ -146,13 +146,13 @@
 }
 
-void Vector3DSpinBox::LoadEvent(QDomElement dom) {
+void Vector3DSpinBox::LoadEvent(QDomElement *dom) {
   if (doublespinbox[0].isEnabled()) {
-    doublespinbox[0].setValue((dom.attribute("value_x")).toDouble());
+    doublespinbox[0].setValue((dom->attribute("value_x")).toDouble());
   }
   if (doublespinbox[1].isEnabled()) {
-    doublespinbox[1].setValue((dom.attribute("value_y")).toDouble());
+    doublespinbox[1].setValue((dom->attribute("value_y")).toDouble());
   }
   if (doublespinbox[2].isEnabled()) {
-    doublespinbox[2].setValue((dom.attribute("value_z")).toDouble());
+    doublespinbox[2].setValue((dom->attribute("value_z")).toDouble());
   }
 }
Index: trunk/tools/FlairGCS/src/Vector3DSpinBox.h
===================================================================
--- trunk/tools/FlairGCS/src/Vector3DSpinBox.h	(revision 268)
+++ trunk/tools/FlairGCS/src/Vector3DSpinBox.h	(revision 269)
@@ -32,5 +32,5 @@
   void SetValues(QString value[3]);
   void Reset(void);
-  void LoadEvent(QDomElement dom);
+  void LoadEvent(QDomElement *dom);
   void ui_to_var(void);
   void ui_to_xml(void);
Index: trunk/tools/FlairGCS/src/XmlWidget.cpp
===================================================================
--- trunk/tools/FlairGCS/src/XmlWidget.cpp	(revision 268)
+++ trunk/tools/FlairGCS/src/XmlWidget.cpp	(revision 269)
@@ -88,11 +88,11 @@
 }
 
-void XmlWidget::ParseXml(QDomElement to_parse) {
-
-  if (to_parse.isNull())
+void XmlWidget::ParseXml(QDomElement *to_parse) {
+
+  if (to_parse->isNull())
     return;
 
-  QString type = to_parse.tagName();
-  QString name = to_parse.attribute("name");
+  QString type = to_parse->tagName();
+  QString name = to_parse->attribute("name");
 
   // fprintf(stderr,"parse %s
@@ -108,9 +108,9 @@
     // si on a une balise IsEnabled, on ne traite que ca
     if (match->visible_widget != NULL) {
-      if (to_parse.attribute("IsEnabled") == "0") {
+      if (to_parse->attribute("IsEnabled") == "0") {
         match->visible_widget->setEnabled(false);
         return;
       }
-      if (to_parse.attribute("IsEnabled") == "1") {
+      if (to_parse->attribute("IsEnabled") == "1") {
         match->visible_widget->setEnabled(true);
         return;
@@ -119,5 +119,5 @@
 
     // si on a une balise delete, on ne traite que ca
-    if (to_parse.attribute("Delete") == "1") {
+    if (to_parse->attribute("Delete") == "1") {
       // fprintf(stderr,"delete flag\n");
       if (match->isContainer == true && match->childs->count() != 0) {
@@ -131,5 +131,5 @@
     }
 
-    if (to_parse.firstChild().isNull() == true &&
+    if (to_parse->firstChild().isNull() == true &&
         match->isExpandable == false) {
       QString new_name;
@@ -148,6 +148,6 @@
       }
       fprintf(stderr,"new_name %s\n", new_name.toLocal8Bit().constData());
-      to_parse.setAttribute("name", new_name);
-      to_parse.setAttribute("old_name", name);
+      to_parse->setAttribute("name", new_name);
+      to_parse->setAttribute("old_name", name);
 
       XmlEvent(to_parse);
@@ -155,21 +155,22 @@
       // return -1;//ou retourner le xml a renvoyer pour chager de nom
     } else {
-      if (to_parse.firstChild().toElement().isNull()) {
+      if (to_parse->firstChild().toElement().isNull()) {
         match->XmlEvent(to_parse);
         return;
       } else {
-        match->ParseXml(to_parse.firstChild().toElement());
-      }
-    }
-  }
-}
-
-void XmlWidget::LoadXml(QDomElement to_parse) {
-  if (to_parse.isNull())
+        QDomElement dom=to_parse->firstChild().toElement();
+        match->ParseXml(&dom);
+      }
+    }
+  }
+}
+
+void XmlWidget::LoadXml(QDomElement *to_parse) {
+  if (to_parse->isNull())
     return;
 
   LoadEvent(to_parse);
 
-  QDomElement elem = to_parse.firstChild().toElement();
+  QDomElement elem = to_parse->firstChild().toElement();
 
   while (!elem.isNull()) {
@@ -184,5 +185,5 @@
     if (match != NULL) {
       // fprintf(stderr,"match\n");
-      match->LoadXml(elem);
+      match->LoadXml(&elem);
     }
     elem = elem.nextSibling().toElement();
Index: trunk/tools/FlairGCS/src/XmlWidget.h
===================================================================
--- trunk/tools/FlairGCS/src/XmlWidget.h	(revision 268)
+++ trunk/tools/FlairGCS/src/XmlWidget.h	(revision 269)
@@ -21,10 +21,10 @@
   ~XmlWidget();
   QDomDocument XmlDoc(void);
-  void ParseXml(QDomElement to_parse);
+  void ParseXml(QDomElement *to_parse);
   void GetFullXml(QDomElement *doc);
   void GetUpdateXml(QDomElement *doc);
   void ResetAllChilds(void);
   virtual bool IsUptodate(void) { return true; };
-  void LoadXml(QDomElement to_parse);
+  void LoadXml(QDomElement *to_parse);
   void RenamedFrom(QString old_name);
   QString Name(void);
@@ -51,6 +51,6 @@
   void SetIsContainer(bool status);
   void SetIsExpandable(bool status);
-  virtual void XmlEvent(QDomElement dom){};
-  virtual void LoadEvent(QDomElement dom){};
+  virtual void XmlEvent(QDomElement *dom){};
+  virtual void LoadEvent(QDomElement *dom){};
   QDomElement *AddXmlChild(QString type);
   void RemoveXmlChild(QDomElement *element);
