Mercurial > hg > svgui
comparison layer/LayerFactory.cpp @ 682:1a0dfcbffaf1
Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 14:06:40 +0000 |
parents | 4806715f7a19 |
children | 692a8b9804fe |
comparison
equal
deleted
inserted
replaced
681:eaf4446a1bef | 682:1a0dfcbffaf1 |
---|---|
462 QSettings settings; | 462 QSettings settings; |
463 settings.beginGroup("LayerDefaults"); | 463 settings.beginGroup("LayerDefaults"); |
464 QString defaults = settings.value(getLayerTypeName(type), "").toString(); | 464 QString defaults = settings.value(getLayerTypeName(type), "").toString(); |
465 if (defaults == "") return; | 465 if (defaults == "") return; |
466 | 466 |
467 // std::cerr << "defaults=\"" << defaults << "\"" << std::endl; | 467 // cerr << "defaults=\"" << defaults << "\"" << endl; |
468 | 468 |
469 QString xml = layer->toXmlString(); | 469 QString xml = layer->toXmlString(); |
470 QDomDocument docOld, docNew; | 470 QDomDocument docOld, docNew; |
471 | 471 |
472 if (docOld.setContent(xml, false) && | 472 if (docOld.setContent(xml, false) && |
478 QDomNamedNodeMap attrNodes = layerElt.attributes(); | 478 QDomNamedNodeMap attrNodes = layerElt.attributes(); |
479 | 479 |
480 for (unsigned int i = 0; i < attrNodes.length(); ++i) { | 480 for (unsigned int i = 0; i < attrNodes.length(); ++i) { |
481 QDomAttr attr = attrNodes.item(i).toAttr(); | 481 QDomAttr attr = attrNodes.item(i).toAttr(); |
482 if (attr.isNull()) continue; | 482 if (attr.isNull()) continue; |
483 // std::cerr << "append \"" << attr.name().toStdString() | 483 // cerr << "append \"" << attr.name().toStdString() |
484 // << "\" -> \"" << attr.value() << "\"" | 484 // << "\" -> \"" << attr.value() << "\"" |
485 // << std::endl; | 485 // << endl; |
486 attrs.append(attr.name(), "", "", attr.value()); | 486 attrs.append(attr.name(), "", "", attr.value()); |
487 } | 487 } |
488 | 488 |
489 layerElt = docOld.firstChildElement("layer"); | 489 layerElt = docOld.firstChildElement("layer"); |
490 attrNodes = layerElt.attributes(); | 490 attrNodes = layerElt.attributes(); |
491 for (unsigned int i = 0; i < attrNodes.length(); ++i) { | 491 for (unsigned int i = 0; i < attrNodes.length(); ++i) { |
492 QDomAttr attr = attrNodes.item(i).toAttr(); | 492 QDomAttr attr = attrNodes.item(i).toAttr(); |
493 if (attr.isNull()) continue; | 493 if (attr.isNull()) continue; |
494 if (attrs.value(attr.name()) == "") { | 494 if (attrs.value(attr.name()) == "") { |
495 // std::cerr << "append \"" << attr.name().toStdString() | 495 // cerr << "append \"" << attr.name().toStdString() |
496 // << "\" -> \"" << attr.value() << "\"" | 496 // << "\" -> \"" << attr.value() << "\"" |
497 // << std::endl; | 497 // << endl; |
498 attrs.append(attr.name(), "", "", attr.value()); | 498 attrs.append(attr.name(), "", "", attr.value()); |
499 } | 499 } |
500 } | 500 } |
501 | 501 |
502 layer->setProperties(attrs); | 502 layer->setProperties(attrs); |