diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-30 13:59:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-20 21:58:39 +0300 |
commit | bc3a7cf853510ffe1e42dc683f854d360f6528c7 (patch) | |
tree | 9898f13eafc3e1a20388d8d592bfcc05c8f50ba7 /src/gui/windows/serverdialog.cpp | |
parent | a058af57bddd4a4394401cc75d33461e17aab8c1 (diff) | |
download | manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.gz manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.bz2 manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.tar.xz manaverse-bc3a7cf853510ffe1e42dc683f854d360f6528c7.zip |
Add pugixml backend incomplete.
Add some defines for xml nodes manipulation.
With pugixml backend no xml writing.
Diffstat (limited to 'src/gui/windows/serverdialog.cpp')
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index c61b58f6d..1049085b4 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -530,7 +530,7 @@ void ServerDialog::loadServers(const bool addNew) server.port = defaultPortForServerType(server.type); } } - else if (!subNode->xmlChildrenNode) + else if (!XmlHaveChildContent(subNode)) { continue; } @@ -539,34 +539,28 @@ void ServerDialog::loadServers(const bool addNew) && server.description.empty()) || (!lang.empty() && xmlNameEqual(subNode, description2.c_str()))) { - server.description = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.description = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "registerurl")) { - server.registerUrl = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.registerUrl = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "onlineListUrl")) { - server.onlineListUrl = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.onlineListUrl = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "support")) { - server.supportUrl = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.supportUrl = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "persistentIp")) { - std::string text = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + std::string text = XmlChildContent(subNode); server.persistentIp = (text == "1" || text == "true"); } else if (xmlNameEqual(subNode, "updateMirror")) { - server.updateMirrors.push_back(reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content)); + server.updateMirrors.push_back(XmlChildContent(subNode)); } } |