mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task: Renamed ::getUDAOrphans to ::getUDAOrphanUUIDs
This commit is contained in:
parent
fdcb084df6
commit
6c9660aee8
3 changed files with 7 additions and 6 deletions
|
@ -1336,12 +1336,15 @@ void Task::removeTag (const std::string& tag)
|
|||
#ifdef PRODUCT_TASKWARRIOR
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// A UDA Orphan is an attribute that is not represented in context.columns.
|
||||
void Task::getUDAOrphans (std::vector <std::string>& names) const
|
||||
std::vector <std::string> Task::getUDAOrphanUUIDs () const
|
||||
{
|
||||
std::vector <std::string> orphans;
|
||||
for (auto& it : data)
|
||||
if (it.first.compare (0, 11, "annotation_", 11) != 0)
|
||||
if (context.columns.find (it.first) == context.columns.end ())
|
||||
names.push_back (it.first);
|
||||
orphans.push_back (it.first);
|
||||
|
||||
return orphans;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -145,7 +145,7 @@ public:
|
|||
void getDependencies (std::vector <std::string>&) const;
|
||||
void getDependencies (std::vector <Task>&) const;
|
||||
|
||||
void getUDAOrphans (std::vector <std::string>&) const;
|
||||
std::vector <std::string> getUDAOrphanUUIDs () const;
|
||||
|
||||
void substitute (const std::string&, const std::string&, const std::string&);
|
||||
#endif
|
||||
|
|
|
@ -312,9 +312,7 @@ std::string CmdEdit::formatTask (Task task, const std::string& dateformat)
|
|||
}
|
||||
|
||||
// UDA orphans
|
||||
std::vector <std::string> orphans;
|
||||
task.getUDAOrphans (orphans);
|
||||
|
||||
auto orphans = task.getUDAOrphanUUIDs ();
|
||||
if (orphans.size ())
|
||||
{
|
||||
before << "# " << STRING_EDIT_UDA_ORPHAN_SEP << '\n';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue