mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Cleanup
- Removed duplicate legacy value map entry. - Added version number to legacy mapping. - Added TODO for later clarification.
This commit is contained in:
parent
91f6980d2f
commit
952d743218
1 changed files with 4 additions and 4 deletions
|
@ -160,19 +160,19 @@ std::string legacyCheckForDeprecatedColumns ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void legacyAttributeMap (std::string& name)
|
void legacyAttributeMap (std::string& name)
|
||||||
{
|
{
|
||||||
// TW-1274
|
// TW-1274, 2.4.0
|
||||||
if (name == "modification")
|
if (name == "modification")
|
||||||
name = "modified";
|
name = "modified";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// TODO Is this needed, given Task::upgradeLegacyValues?
|
||||||
void legacyValueMap (const std::string& name, std::string& value)
|
void legacyValueMap (const std::string& name, std::string& value)
|
||||||
{
|
{
|
||||||
// 2014-07-03: One-time initialization value mapping.
|
// 2014-07-03: One-time initialization value mapping.
|
||||||
static std::map <std::string, std::string> mapping;
|
static std::map <std::string, std::string> mapping;
|
||||||
if (mapping.size () == 0)
|
if (mapping.size () == 0)
|
||||||
{
|
{
|
||||||
mapping["hrs"] = "hours";
|
|
||||||
mapping["hrs"] = "hours";
|
mapping["hrs"] = "hours";
|
||||||
mapping["hr"] = "hours";
|
mapping["hr"] = "hours";
|
||||||
mapping["mins"] = "minutes";
|
mapping["mins"] = "minutes";
|
||||||
|
@ -180,13 +180,13 @@ void legacyValueMap (const std::string& name, std::string& value)
|
||||||
mapping["mths"] = "months";
|
mapping["mths"] = "months";
|
||||||
mapping["mth"] = "months";
|
mapping["mth"] = "months";
|
||||||
mapping["mos"] = "months";
|
mapping["mos"] = "months";
|
||||||
mapping["m"] = "months";
|
mapping["m"] = "months"; // ?
|
||||||
mapping["qrtrs"] = "quarters";
|
mapping["qrtrs"] = "quarters";
|
||||||
mapping["qtrs"] = "quarters";
|
mapping["qtrs"] = "quarters";
|
||||||
mapping["qtr"] = "quarters";
|
mapping["qtr"] = "quarters";
|
||||||
mapping["secs"] = "seconds";
|
mapping["secs"] = "seconds";
|
||||||
mapping["sec"] = "seconds";
|
mapping["sec"] = "seconds";
|
||||||
mapping["s"] = "seconds";
|
mapping["s"] = "seconds"; // ?
|
||||||
mapping["wks"] = "weeks";
|
mapping["wks"] = "weeks";
|
||||||
mapping["wk"] = "weeks";
|
mapping["wk"] = "weeks";
|
||||||
mapping["yrs"] = "years";
|
mapping["yrs"] = "years";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue