/////////////////////////////////////////////////////////////////////////// Note that all fields undergo encode/decode.
| 719 | //////////////////////////////////////////////////////////////////////////////// |
| 720 | // Note that all fields undergo encode/decode. |
| 721 | void Task::parseTC(rust::Box<tc::TaskData> task) { |
| 722 | auto items = task->items(); |
| 723 | data.clear(); |
| 724 | for (auto& item : items) { |
| 725 | data[static_cast<std::string>(item.prop)] = static_cast<std::string>(item.value); |
| 726 | } |
| 727 | |
| 728 | // count annotations |
| 729 | annotation_count = 0; |
| 730 | for (auto i : data) { |
| 731 | if (isAnnotationAttr(i.first)) { |
| 732 | ++annotation_count; |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | data["uuid"] = static_cast<std::string>(task->get_uuid().to_string()); |
| 737 | id = Context::getContext().tdb2.id(data["uuid"]); |
| 738 | } |
| 739 | |
| 740 | //////////////////////////////////////////////////////////////////////////////// |
| 741 | // No legacy formats are currently supported as of 2.4.0. |