Mercurial > hg > svgui
comparison layer/LayerFactory.cpp @ 683:692a8b9804fe
Drop toStdString() and toLocal8Bit().data(), with debug header we can stream QStrings
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 14:11:04 +0000 |
parents | 1a0dfcbffaf1 |
children | 917039d333bb |
comparison
equal
deleted
inserted
replaced
682:1a0dfcbffaf1 | 683:692a8b9804fe |
---|---|
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 // cerr << "append \"" << attr.name().toStdString() | 483 // cerr << "append \"" << attr.name() |
484 // << "\" -> \"" << attr.value() << "\"" | 484 // << "\" -> \"" << attr.value() << "\"" |
485 // << endl; | 485 // << endl; |
486 attrs.append(attr.name(), "", "", attr.value()); | 486 attrs.append(attr.name(), "", "", attr.value()); |
487 } | 487 } |
488 | 488 |
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 // cerr << "append \"" << attr.name().toStdString() | 495 // cerr << "append \"" << attr.name() |
496 // << "\" -> \"" << attr.value() << "\"" | 496 // << "\" -> \"" << attr.value() << "\"" |
497 // << endl; | 497 // << endl; |
498 attrs.append(attr.name(), "", "", attr.value()); | 498 attrs.append(attr.name(), "", "", attr.value()); |
499 } | 499 } |
500 } | 500 } |