修复了setmap的bug
This commit is contained in:
parent
1576a3c0b0
commit
fc86521d1e
|
@ -148,13 +148,11 @@ void XMLConfig::setMap(const QList<QString> &path, const QHash<QString, QString>
|
||||||
{
|
{
|
||||||
auto root = doc_ins.documentElement();
|
auto root = doc_ins.documentElement();
|
||||||
auto telm = rebuild_exists_elms(root, path);
|
auto telm = rebuild_exists_elms(root, path);
|
||||||
auto childs = telm.childNodes();
|
auto childs = telm.elementsByTagName("list");
|
||||||
|
|
||||||
QList<QDomNode> nodes;
|
for (auto idx = childs.count() - 1; idx >= 0; --idx) {
|
||||||
for(auto idx=0; idx<childs.count(); ++idx){
|
auto node = childs.at(idx);
|
||||||
auto child = childs.at(idx);
|
telm.removeChild(node);
|
||||||
if(child.isElement() && child.toElement().tagName() == "map")
|
|
||||||
telm.removeChild(child);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto &key : map.keys()){
|
for(auto &key : map.keys()){
|
||||||
|
|
Loading…
Reference in New Issue