From a9513323677284da05c1cf6418b4ae270cefaf0d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 7 Jan 2017 11:04:08 -0500 Subject: [PATCH] Columns: Attribute objects properly delegate to Column::setStyle to validate formats --- src/columns/ColDepends.cpp | 2 +- src/columns/ColEntry.cpp | 2 +- src/columns/ColRecur.cpp | 2 +- src/columns/ColScheduled.cpp | 2 +- src/columns/ColStart.cpp | 2 +- src/columns/ColStatus.cpp | 2 +- src/columns/ColTags.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/columns/ColDepends.cpp b/src/columns/ColDepends.cpp index b15a85d1e..41e24eafb 100644 --- a/src/columns/ColDepends.cpp +++ b/src/columns/ColDepends.cpp @@ -58,7 +58,7 @@ ColumnDepends::ColumnDepends () // Note that you can not determine which gets called first. void ColumnDepends::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "indicator" && _label == STRING_COLUMN_LABEL_DEP) _label = _label.substr (0, context.config.get ("dependency.indicator").length ()); else if (_style == "count" && _label == STRING_COLUMN_LABEL_DEP) _label = STRING_COLUMN_LABEL_DEP_S; diff --git a/src/columns/ColEntry.cpp b/src/columns/ColEntry.cpp index 17422e11d..a28ee3603 100644 --- a/src/columns/ColEntry.cpp +++ b/src/columns/ColEntry.cpp @@ -41,7 +41,7 @@ ColumnEntry::ColumnEntry () // Note that you can not determine which gets called first. void ColumnEntry::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "age" && _label == STRING_COLUMN_LABEL_ADDED) diff --git a/src/columns/ColRecur.cpp b/src/columns/ColRecur.cpp index 59e1907f7..33af885d6 100644 --- a/src/columns/ColRecur.cpp +++ b/src/columns/ColRecur.cpp @@ -57,7 +57,7 @@ ColumnRecur::ColumnRecur () // Note that you can not determine which gets called first. void ColumnRecur::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "indicator" && _label == STRING_COLUMN_LABEL_RECUR) _label = _label.substr (0, context.config.get ("recurrence.indicator").length ()); diff --git a/src/columns/ColScheduled.cpp b/src/columns/ColScheduled.cpp index f81ad339a..f7e726cc1 100644 --- a/src/columns/ColScheduled.cpp +++ b/src/columns/ColScheduled.cpp @@ -40,7 +40,7 @@ ColumnScheduled::ColumnScheduled () // Note that you can not determine which gets called first. void ColumnScheduled::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "countdown" && _label == STRING_COLUMN_LABEL_SCHED) _label = STRING_COLUMN_LABEL_COUNT; diff --git a/src/columns/ColStart.cpp b/src/columns/ColStart.cpp index ae6f9f4cd..86929da46 100644 --- a/src/columns/ColStart.cpp +++ b/src/columns/ColStart.cpp @@ -47,7 +47,7 @@ ColumnStart::ColumnStart () // Note that you can not determine which gets called first. void ColumnStart::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "active" && _label == STRING_COLUMN_LABEL_STARTED) _label = STRING_COLUMN_LABEL_ACTIVE; diff --git a/src/columns/ColStatus.cpp b/src/columns/ColStatus.cpp index b06903648..044b536b9 100644 --- a/src/columns/ColStatus.cpp +++ b/src/columns/ColStatus.cpp @@ -46,7 +46,7 @@ ColumnStatus::ColumnStatus () // Note that you can not determine which gets called first. void ColumnStatus::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "short" && _label == STRING_COLUMN_LABEL_STATUS) _label = STRING_COLUMN_LABEL_STAT; diff --git a/src/columns/ColTags.cpp b/src/columns/ColTags.cpp index 8d33348d0..e69d4d5b6 100644 --- a/src/columns/ColTags.cpp +++ b/src/columns/ColTags.cpp @@ -59,7 +59,7 @@ ColumnTags::ColumnTags () // Note that you can not determine which gets called first. void ColumnTags::setStyle (const std::string& value) { - _style = value; + Column::setStyle (value); if (_style == "indicator" && _label == STRING_COLUMN_LABEL_TAGS)