Changeset 269 in flair-src for trunk/tools/FlairGCS/src/ListWidget.cpp


Ignore:
Timestamp:
10/04/18 13:53:11 (6 years ago)
Author:
Sanahuja Guillaume
Message:

flairgcs:
speed up processing time when receiving datas from uav
triger watchdog while receiving datas from uav
(avoids connection lost in uav)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/ListWidget.cpp

    r88 r269  
    5151}
    5252
    53 void ListWidget::XmlEvent(QDomElement dom) {
     53void ListWidget::XmlEvent(QDomElement *dom) {
    5454  isUpToDate = false;
    55   if (dom.attribute("item") != "") {
    56     QString item = dom.attribute("item");
     55  if (dom->attribute("item") != "") {
     56    QString item = dom->attribute("item");
    5757    QListWidgetItem *widget_item = new QListWidgetItem(item);
    5858    // new item, so the text is red
     
    6060    listwidget->addItem(widget_item);
    6161  }
    62   if (dom.attribute("delete") != "") {
    63     int row_to_del = dom.attribute("delete").toInt();
     62  if (dom->attribute("delete") != "") {
     63    int row_to_del = dom->attribute("delete").toInt();
    6464    RemoveItemFromXml(row_to_del);
    6565    QListWidgetItem *item_to_del = listwidget->takeItem(row_to_del);
     
    106106}
    107107
    108 void ListWidget::LoadEvent(QDomElement dom) {
     108void ListWidget::LoadEvent(QDomElement *dom) {
    109109  //function not tested
    110110  std::cout << "FlairGCS LoadEvent" << std::endl;
     
    114114    QStringList items;
    115115    int count = 0;
    116     while (dom.hasAttribute("item" + QString::number(count))) {
     116    while (dom->hasAttribute("item" + QString::number(count))) {
    117117      std::cout << "FlairGCS LoadEvent boucle" << std::endl;
    118       listwidget->addItem(dom.attribute("item" + QString::number(count)));
     118      listwidget->addItem(dom->attribute("item" + QString::number(count)));
    119119      count++;
    120120    }
Note: See TracChangeset for help on using the changeset viewer.