Integration - attribute validation
- Implemented digitsOnly primitive. - Implemented noSpaces primitive. - Added unit tests for above. - Att now manages the lists of valid attributes and modifier names. - validName migrated to Att. - validModifiableName migrated to Att. - New Att::validNameValue. - Removed obsolete validDescription. - Removed obsolete validPriority. - Removed obsolete valid.cpp/guess. - Implemented text.cpp/noVerticalSpace. - Added unit tests for text.cpp/noVerticalSpace. - Removed final static lists from valid.cpp.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <string.h>
|
||||
#include "T.h"
|
||||
#include "Date.h"
|
||||
#include "Duration.h"
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
#include "main.h"
|
||||
@@ -211,7 +212,7 @@ static void parseTask (T& task, const std::string& after)
|
||||
{
|
||||
if (value != "")
|
||||
{
|
||||
if (validPriority (value))
|
||||
if (Att::validNameValue ("priority", "", value))
|
||||
{
|
||||
std::cout << "Priority modified." << std::endl;
|
||||
task.setAttribute ("priority", value);
|
||||
@@ -392,7 +393,8 @@ static void parseTask (T& task, const std::string& after)
|
||||
{
|
||||
if (value != "")
|
||||
{
|
||||
if (validDuration (value))
|
||||
Duration d;
|
||||
if (d.valid (value))
|
||||
{
|
||||
std::cout << "Recurrence modified." << std::endl;
|
||||
if (task.getAttribute ("due") != "")
|
||||
|
||||
Reference in New Issue
Block a user