Changeset 244 in flair-src for trunk/tools/FlairGCS/src/XmlWidget.cpp
- Timestamp:
- 05/24/18 11:45:33 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/XmlWidget.cpp
r68 r244 73 73 74 74 XmlWidget *XmlWidget::GetXmlWidget(QString name, QString type) { 75 // printf("recherche %s75 // fprintf(stderr,"recherche %s 76 76 // %s\n",name.toLocal8Bit().constData(),type.toLocal8Bit().constData()); 77 77 78 78 for (int i = 0; i < childs->count(); i++) { 79 // printf("child name79 // fprintf(stderr,"child name 80 80 // %s\n",childs->at(i)->write_elem.attribute("name").toLocal8Bit().constData()); 81 // printf("child tag81 // fprintf(stderr,"child tag 82 82 // %s\n",childs->at(i)->write_elem.tagName().toLocal8Bit().constData()); 83 83 if (childs->at(i)->write_elem.attribute("name") == name && … … 96 96 QString name = to_parse.attribute("name"); 97 97 98 // printf("parse %s98 // fprintf(stderr,"parse %s 99 99 // %s\n",type.toLocal8Bit().constData(),name.toLocal8Bit().constData()); 100 100 XmlWidget *match; … … 102 102 103 103 if (match == NULL) { 104 // printf("not match\n");104 // fprintf(stderr,"not match\n"); 105 105 XmlEvent(to_parse); 106 106 } else { 107 // printf("match\n");107 // fprintf(stderr,"match\n"); 108 108 // si on a une balise IsEnabled, on ne traite que ca 109 109 if (match->visible_widget != NULL) { … … 120 120 // si on a une balise delete, on ne traite que ca 121 121 if (to_parse.attribute("Delete") == "1") { 122 // printf("delete flag\n");122 // fprintf(stderr,"delete flag\n"); 123 123 if (match->isContainer == true && match->childs->count() != 0) { 124 // printf("non vide124 // fprintf(stderr,"non vide 125 125 // %s\n",match->objectName().toLocal8Bit().constData()); 126 126 return; … … 134 134 match->isExpandable == false) { 135 135 QString new_name; 136 printf("possible doublon\n");136 fprintf(stderr,"possible doublon\n"); 137 137 for (int i = 0; i < 65535; i++) { 138 138 new_name = QString("%1_%2").arg(name).arg(i); … … 147 147 break; 148 148 } 149 printf("new_name %s\n", new_name.toLocal8Bit().constData());149 fprintf(stderr,"new_name %s\n", new_name.toLocal8Bit().constData()); 150 150 to_parse.setAttribute("name", new_name); 151 151 to_parse.setAttribute("old_name", name); … … 177 177 QString type = elem.tagName(); 178 178 QString name = elem.attribute("name"); 179 // printf("%s179 // fprintf(stderr,"%s 180 180 // %s\n",type.toLocal8Bit().constData(),name.toLocal8Bit().constData()); 181 181 XmlWidget *match; … … 183 183 184 184 if (match != NULL) { 185 // printf("match\n");185 // fprintf(stderr,"match\n"); 186 186 match->LoadXml(elem); 187 187 } … … 296 296 QDomNamedNodeMap attributes=write_elem.attributes(); 297 297 while(attributes.count()!=0) { 298 // printf("%i %s\n",attributes.count(),attributes.item(0).toAttr().name().toLocal8Bit().constData());298 //fprintf(stderr,"%i %s\n",attributes.count(),attributes.item(0).toAttr().name().toLocal8Bit().constData()); 299 299 write_elem.removeAttribute(attributes.item(0).toAttr().name()); 300 300 }
Note:
See TracChangeset
for help on using the changeset viewer.