From dbf641988e9ae9d36ea687f8ea9a24c74eaa3a94 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 2 Oct 2021 21:35:14 -0400 Subject: [PATCH] CmdTags: Update pointers to task enumeration lists --- src/Task.cpp | 3 +++ src/commands/CmdInfo.cpp | 2 +- src/commands/CmdTags.cpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index 564be806b..3e5ea2d8f 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1347,6 +1347,9 @@ bool Task::hasTag (const std::string& tag) const // Note: This list must match that in ::feedback_reserved_tags. if (isupper (tag[0])) { + // NOTE: This list should be kept synchronized with: + // * the list in CmdTags.cpp for the _tags command. + // * the list in CmdInfo.cpp for the info command. if (tag == "BLOCKED") return is_blocked; if (tag == "UNBLOCKED") return !is_blocked; if (tag == "BLOCKING") return is_blocking; diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 3cdc5e796..f413d311a 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -357,7 +357,7 @@ int CmdInfo::execute (std::string& output) if (task.hasTag ("WEEK")) virtualTags += "WEEK "; if (task.hasTag ("YEAR")) virtualTags += "YEAR "; if (task.hasTag ("YESTERDAY")) virtualTags += "YESTERDAY "; - // If you update the above list, update src/commands/CmdInfo.cpp and src/commands/CmdTags.cpp as well. + // If you update the above list, update src/Task.cpp and src/commands/CmdTags.cpp as well. row = view.addRow (); view.set (row, 0, "Virtual tags"); diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index 4013c415b..1e387e319 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -212,7 +212,8 @@ int CmdCompletionTags::execute (std::string& output) unique["WEEK"] = 0; unique["YEAR"] = 0; unique["YESTERDAY"] = 0; - // If you update the above list, update src/commands/CmdInfo.cpp and src/commands/CmdTags.cpp as well. + + // If you update the above list, update src/commands/CmdInfo.cpp and src/Task.cpp as well. std::stringstream out; for (auto& it : unique)