diff --git a/editor/editor_config.cpp b/editor/editor_config.cpp index 476e00ceb..1633965c5 100644 --- a/editor/editor_config.cpp +++ b/editor/editor_config.cpp @@ -87,7 +87,7 @@ bool TypeDescriptionFromXml(pugi::xml_node const & root, pugi::xml_node const & auto const node = xNode.node(); std::string const groupName = node.attribute("group").value(); - std::string const xpath = "/omaps/editor/fields/field_group[@name='" + groupName + "']"; + std::string const xpath = "/comaps/editor/fields/field_group[@name='" + groupName + "']"; auto const group = root.select_node(xpath.data()).node(); ASSERT(group, ("No such group", groupName)); @@ -114,7 +114,7 @@ bool TypeDescriptionFromXml(pugi::xml_node const & root, pugi::xml_node const & std::vector GetPrioritizedTypes(pugi::xml_node const & node) { std::vector result; - for (auto const & xNode : node.select_nodes("/omaps/editor/types/type[@id]")) + for (auto const & xNode : node.select_nodes("/comaps/editor/types/type[@id]")) result.push_back(xNode.node()); stable_sort(begin(result), end(result), [](pugi::xml_node const & lhs, pugi::xml_node const & rhs) { @@ -168,7 +168,7 @@ bool EditorConfig::GetTypeDescription(std::vector classificatorType std::vector EditorConfig::GetTypesThatCanBeAdded() const { auto const xpathResult = - m_document.select_nodes("/omaps/editor/types/type[not(@can_add='no' or @editable='no')]"); + m_document.select_nodes("/comaps/editor/types/type[not(@can_add='no' or @editable='no')]"); std::vector result; for (auto const & xNode : xpathResult) diff --git a/editor/editor_tests/config_loader_test.cpp b/editor/editor_tests/config_loader_test.cpp index 9020812f5..62c81b39c 100644 --- a/editor/editor_tests/config_loader_test.cpp +++ b/editor/editor_tests/config_loader_test.cpp @@ -16,9 +16,9 @@ using platform::tests_support::ScopedFile; void CheckGeneralTags(pugi::xml_document const & doc) { - auto const types = doc.select_nodes("/omaps/editor/types"); + auto const types = doc.select_nodes("/comaps/editor/types"); TEST(!types.empty(), ()); - auto const fields = doc.select_nodes("/omaps/editor/fields"); + auto const fields = doc.select_nodes("/comaps/editor/fields"); TEST(!fields.empty(), ()); } diff --git a/editor/editor_tests/osm_editor_test.cpp b/editor/editor_tests/osm_editor_test.cpp index fb82cc84d..a20df020b 100644 --- a/editor/editor_tests/osm_editor_test.cpp +++ b/editor/editor_tests/osm_editor_test.cpp @@ -162,7 +162,7 @@ void GenerateUploadedFeature(MwmSet::MwmId const & mwmId, osm::EditableMapObject const & emo, pugi::xml_document & out) { - pugi::xml_node root = out.append_child("omaps"); + pugi::xml_node root = out.append_child("comaps"); root.append_attribute("format_version") = 1; pugi::xml_node mwmNode = root.append_child("mwm"); diff --git a/editor/osm_auth_tests/server_api_test.cpp b/editor/osm_auth_tests/server_api_test.cpp index 53f7b666d..f8af4cca3 100644 --- a/editor/osm_auth_tests/server_api_test.cpp +++ b/editor/osm_auth_tests/server_api_test.cpp @@ -82,7 +82,7 @@ UNIT_TEST(OSM_ServerAPI_ChangesetAndNode) XMLFeature node(XMLFeature::Type::Node); ServerApi06 const api = CreateAPI(); - uint64_t changeSetId = api.CreateChangeSet({{"created_by", "OMaps Unit Test"}, + uint64_t changeSetId = api.CreateChangeSet({{"created_by", "CoMaps Unit Test"}, {"comment", "For test purposes only."}}); auto const changesetCloser = [&]() { api.CloseChangeSet(changeSetId); }; @@ -110,7 +110,7 @@ UNIT_TEST(OSM_ServerAPI_ChangesetAndNode) TEST_EQUAL(node.GetAttribute("version"), "2", ()); // All tags must be specified, because there is no merging of old and new tags. - api.UpdateChangeSet(changeSetId, {{"created_by", "OMaps Unit Test"}, + api.UpdateChangeSet(changeSetId, {{"created_by", "CoMaps Unit Test"}, {"comment", "For test purposes only (updated)."}}); // To retrieve created node, changeset should be closed first. @@ -124,7 +124,7 @@ UNIT_TEST(OSM_ServerAPI_ChangesetAndNode) TEST_EQUAL(node.GetAttribute("id"), features[0].GetAttribute("id"), ()); // Cleanup - delete unit test node from the server. - changeSetId = api.CreateChangeSet({{"created_by", "OMaps Unit Test"}, + changeSetId = api.CreateChangeSet({{"created_by", "CoMaps Unit Test"}, {"comment", "For test purposes only."}}); SCOPE_GUARD(guard, changesetCloser); // New changeset has new id. diff --git a/editor/osm_editor.cpp b/editor/osm_editor.cpp index 1c3bd90ae..6c9783a8e 100644 --- a/editor/osm_editor.cpp +++ b/editor/osm_editor.cpp @@ -38,7 +38,7 @@ using std::make_shared, std::string; namespace { -constexpr char const * kXmlRootNode = "omaps"; +constexpr char const * kXmlRootNode = "comaps"; constexpr char const * kXmlMwmNode = "mwm"; constexpr char const * kDeleteSection = "delete"; constexpr char const * kModifySection = "modify"; @@ -168,9 +168,6 @@ void Editor::LoadEdits() auto loadedFeatures = make_shared(); auto rootNode = doc.child(kXmlRootNode); - // Migrate clients with an old root node. - if (!rootNode) - rootNode = doc.child("mapsme"); // TODO: Empty rootNode is an OK case for the current logic and unit tests. Check if there is a better way to do it. for (auto const & mwm : rootNode.children(kXmlMwmNode)) {