mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Build
- Enabled compiler warnings, which were off. Yikes. - Fixed all compiler warnings on OSX.
This commit is contained in:
parent
36e24fa1fb
commit
0260aff441
40 changed files with 121 additions and 82 deletions
|
@ -50,6 +50,7 @@ endif (LUA51_FOUND)
|
||||||
|
|
||||||
check_function_exists (random HAVE_RANDOM)
|
check_function_exists (random HAVE_RANDOM)
|
||||||
check_function_exists (srandom HAVE_SRANDOM)
|
check_function_exists (srandom HAVE_SRANDOM)
|
||||||
|
|
||||||
# Some systems include uuid automatically (OS X), others need the includes/library
|
# Some systems include uuid automatically (OS X), others need the includes/library
|
||||||
check_function_exists (uuid_unparse_lower HAVE_UUID)
|
check_function_exists (uuid_unparse_lower HAVE_UUID)
|
||||||
if (NOT HAVE_UUID)
|
if (NOT HAVE_UUID)
|
||||||
|
|
|
@ -83,7 +83,7 @@ static int api_task_debug_message (lua_State* L)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Causes the shell or interactive mode task to exit. Ordinarily this does not
|
// Causes the shell or interactive mode task to exit. Ordinarily this does not
|
||||||
// occur.
|
// occur.
|
||||||
static int api_task_exit (lua_State* L)
|
static int api_task_exit (lua_State*)
|
||||||
{
|
{
|
||||||
// TODO Is this the correct exception? How does the shell handle this?
|
// TODO Is this the correct exception? How does the shell handle this?
|
||||||
std::cout << "Exiting." << std::endl;
|
std::cout << "Exiting." << std::endl;
|
||||||
|
@ -105,6 +105,8 @@ static int api_task_get (lua_State* L)
|
||||||
// TODO Error!
|
// TODO Error!
|
||||||
lua_pushstring (L, "");
|
lua_pushstring (L, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -123,6 +125,8 @@ static int api_task_set (lua_State* L)
|
||||||
// TODO Error!
|
// TODO Error!
|
||||||
lua_pushstring (L, "");
|
lua_pushstring (L, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -286,7 +286,7 @@ void Arguments::extract_sequence (std::vector <int>& sequence)
|
||||||
std::vector <int> kill;
|
std::vector <int> kill;
|
||||||
|
|
||||||
bool terminated = false;
|
bool terminated = false;
|
||||||
for (int i = 0; i < this->size (); ++i)
|
for (unsigned int i = 0; i < this->size (); ++i)
|
||||||
{
|
{
|
||||||
if (!terminated)
|
if (!terminated)
|
||||||
{
|
{
|
||||||
|
@ -358,7 +358,7 @@ void Arguments::extract_sequence (std::vector <int>& sequence)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now remove args in the kill list.
|
// Now remove args in the kill list.
|
||||||
for (int k = 0; k < kill.size (); ++k)
|
for (unsigned int k = 0; k < kill.size (); ++k)
|
||||||
this->erase (this->begin () + kill[k]);
|
this->erase (this->begin () + kill[k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -606,7 +606,9 @@ bool Att::match (const Att& other) const
|
||||||
bool case_sensitive = context.config.getBoolean ("search.case.sensitive");
|
bool case_sensitive = context.config.getBoolean ("search.case.sensitive");
|
||||||
|
|
||||||
// Are regular expressions being used in place of string comparison?
|
// Are regular expressions being used in place of string comparison?
|
||||||
|
#ifdef FEATURE_REGEX
|
||||||
bool regex = context.config.getBoolean ("regex");
|
bool regex = context.config.getBoolean ("regex");
|
||||||
|
#endif
|
||||||
|
|
||||||
// If there are no mods, just perform a straight compare on value.
|
// If there are no mods, just perform a straight compare on value.
|
||||||
if (mMod == "")
|
if (mMod == "")
|
||||||
|
|
|
@ -65,5 +65,6 @@ set_property (TARGET task_executable PROPERTY OUTPUT_NAME "task")
|
||||||
install (TARGETS task_executable DESTINATION ${TASK_BINDIR})
|
install (TARGETS task_executable DESTINATION ${TASK_BINDIR})
|
||||||
|
|
||||||
set (CMAKE_BUILD_TYPE debug)
|
set (CMAKE_BUILD_TYPE debug)
|
||||||
set (CMAKE_C_FLAGS_DEBUG "-ggdb3")
|
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3 -Wall")
|
||||||
set (CMAKE_C_FLAGS_RELEASE "-O3")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wall")
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@ std::string json::string::dump ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
json::number* json::number::parse (Nibbler& nibbler)
|
json::number* json::number::parse (Nibbler& nibbler)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
double d;
|
double d;
|
||||||
if (nibbler.getNumber (d))
|
if (nibbler.getNumber (d))
|
||||||
{
|
{
|
||||||
|
|
|
@ -299,8 +299,6 @@ int TDB::loadPending (std::vector <Task>& tasks, Filter& filter)
|
||||||
{
|
{
|
||||||
// TODO Add hidden attribute indicating source?
|
// TODO Add hidden attribute indicating source?
|
||||||
Task task (line);
|
Task task (line);
|
||||||
|
|
||||||
Task::status status = task.getStatus ();
|
|
||||||
task.id = mId++;
|
task.id = mId++;
|
||||||
|
|
||||||
mPending.push_back (task);
|
mPending.push_back (task);
|
||||||
|
|
|
@ -51,6 +51,7 @@ Variant::Variant (const Variant& other)
|
||||||
case v_string: mString = other.mString; break;
|
case v_string: mString = other.mString; break;
|
||||||
case v_date: mDate = other.mDate; break;
|
case v_date: mDate = other.mDate; break;
|
||||||
case v_duration: mDuration = other.mDuration; break;
|
case v_duration: mDuration = other.mDuration; break;
|
||||||
|
case v_unknown: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,6 +148,9 @@ Variant& Variant::operator<= (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
mBool = (time_t)mDuration <= (time_t)other.mDuration ? true : false;
|
mBool = (time_t)mDuration <= (time_t)other.mDuration ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mType = v_boolean;
|
mType = v_boolean;
|
||||||
|
@ -184,6 +188,9 @@ Variant& Variant::operator>= (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
mBool = (time_t)mDuration >= (time_t)other.mDuration ? true : false;
|
mBool = (time_t)mDuration >= (time_t)other.mDuration ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mType = v_boolean;
|
mType = v_boolean;
|
||||||
|
@ -221,6 +228,9 @@ Variant& Variant::operator== (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
mBool = mDuration == other.mDuration ? true : false;
|
mBool = mDuration == other.mDuration ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mType = v_boolean;
|
mType = v_boolean;
|
||||||
|
@ -258,6 +268,9 @@ Variant& Variant::operator!= (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
mBool = mDuration != other.mDuration ? true : false;
|
mBool = mDuration != other.mDuration ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mType = v_boolean;
|
mType = v_boolean;
|
||||||
|
@ -292,6 +305,9 @@ Variant& Variant::operator^ (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
throw std::string ("Cannot perform exponentiation on duration types");
|
throw std::string ("Cannot perform exponentiation on duration types");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -335,6 +351,9 @@ Variant& Variant::operator- (const Variant& other)
|
||||||
// TODO Missing operator -=
|
// TODO Missing operator -=
|
||||||
//mDuration -= other.mDuration;
|
//mDuration -= other.mDuration;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -370,6 +389,9 @@ Variant& Variant::operator+ (const Variant& other)
|
||||||
// TODO operator+ missing
|
// TODO operator+ missing
|
||||||
//mDuration += other.mDuration;
|
//mDuration += other.mDuration;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -403,6 +425,9 @@ Variant& Variant::operator* (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
throw std::string ("Cannot perform multiplication on duration types");
|
throw std::string ("Cannot perform multiplication on duration types");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -436,6 +461,9 @@ Variant& Variant::operator/ (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
throw std::string ("Cannot perform division on duration types");
|
throw std::string ("Cannot perform division on duration types");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -472,6 +500,9 @@ Variant& Variant::operator< (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
mBool = mDuration < other.mDuration ? true : false;
|
mBool = mDuration < other.mDuration ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mType = v_boolean;
|
mType = v_boolean;
|
||||||
|
@ -509,6 +540,9 @@ Variant& Variant::operator> (const Variant& other)
|
||||||
case v_duration:
|
case v_duration:
|
||||||
mBool = mDuration > other.mDuration ? true : false;
|
mBool = mDuration > other.mDuration ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case v_unknown:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mType = v_boolean;
|
mType = v_boolean;
|
||||||
|
|
|
@ -44,8 +44,7 @@ public:
|
||||||
v_double = 8,
|
v_double = 8,
|
||||||
v_string = 16,
|
v_string = 16,
|
||||||
v_date = 32,
|
v_date = 32,
|
||||||
v_duration = 64,
|
v_duration = 64
|
||||||
v_other = 128
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Variant ();
|
Variant ();
|
||||||
|
|
|
@ -114,12 +114,12 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
int global_min = utf8_length ((*i)->getLabel ());
|
int global_min = utf8_length ((*i)->getLabel ());
|
||||||
int global_ideal = global_min;
|
int global_ideal = global_min;
|
||||||
|
|
||||||
for (int s = 0; s < sequence.size (); ++s)
|
for (unsigned int s = 0; s < sequence.size (); ++s)
|
||||||
{
|
{
|
||||||
if (s >= _truncate_lines && _truncate_lines != 0)
|
if ((int)s >= _truncate_lines && _truncate_lines != 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (s >= _truncate_rows && _truncate_rows != 0)
|
if ((int)s >= _truncate_rows && _truncate_rows != 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Determine minimum and ideal width for this column.
|
// Determine minimum and ideal width for this column.
|
||||||
|
@ -175,7 +175,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
while (overage && needed)
|
while (overage && needed)
|
||||||
{
|
{
|
||||||
needed = false;
|
needed = false;
|
||||||
for (int i = 0; i < _columns.size () && overage; ++i)
|
for (unsigned int i = 0; i < _columns.size () && overage; ++i)
|
||||||
{
|
{
|
||||||
if (widths[i] < ideal[i])
|
if (widths[i] < ideal[i])
|
||||||
{
|
{
|
||||||
|
@ -188,9 +188,9 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compose column headers.
|
// Compose column headers.
|
||||||
int max_lines = 0;
|
unsigned int max_lines = 0;
|
||||||
std::vector <std::vector <std::string> > headers;
|
std::vector <std::vector <std::string> > headers;
|
||||||
for (int c = 0; c < _columns.size (); ++c)
|
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||||
{
|
{
|
||||||
headers.push_back (std::vector <std::string> ());
|
headers.push_back (std::vector <std::string> ());
|
||||||
_columns[c]->renderHeader (headers[c], widths[c], _header);
|
_columns[c]->renderHeader (headers[c], widths[c], _header);
|
||||||
|
@ -213,11 +213,11 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
std::string intra_odd = context.color () ? _intra_odd.colorize (intra) : intra;
|
std::string intra_odd = context.color () ? _intra_odd.colorize (intra) : intra;
|
||||||
std::string intra_even = context.color () ? _intra_even.colorize (intra) : intra;
|
std::string intra_even = context.color () ? _intra_even.colorize (intra) : intra;
|
||||||
|
|
||||||
for (int i = 0; i < max_lines; ++i)
|
for (unsigned int i = 0; i < max_lines; ++i)
|
||||||
{
|
{
|
||||||
out += left_margin + extra;
|
out += left_margin + extra;
|
||||||
|
|
||||||
for (int c = 0; c < _columns.size (); ++c)
|
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||||
{
|
{
|
||||||
if (c)
|
if (c)
|
||||||
out += intra;
|
out += intra;
|
||||||
|
@ -243,7 +243,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
_rows = 0;
|
_rows = 0;
|
||||||
std::vector <std::vector <std::string> > cells;
|
std::vector <std::vector <std::string> > cells;
|
||||||
std::vector <int>::iterator s;
|
std::vector <int>::iterator s;
|
||||||
for (int s = 0; s < sequence.size (); ++s)
|
for (unsigned int s = 0; s < sequence.size (); ++s)
|
||||||
{
|
{
|
||||||
max_lines = 0;
|
max_lines = 0;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
row_color.blend (rule_color);
|
row_color.blend (rule_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int c = 0; c < _columns.size (); ++c)
|
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||||
{
|
{
|
||||||
cells.push_back (std::vector <std::string> ());
|
cells.push_back (std::vector <std::string> ());
|
||||||
_columns[c]->render (cells[c], data[sequence[s]], widths[c], row_color);
|
_columns[c]->render (cells[c], data[sequence[s]], widths[c], row_color);
|
||||||
|
@ -269,11 +269,11 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
||||||
max_lines = cells[c].size ();
|
max_lines = cells[c].size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < max_lines; ++i)
|
for (unsigned int i = 0; i < max_lines; ++i)
|
||||||
{
|
{
|
||||||
out += left_margin + (odd ? extra_odd : extra_even);
|
out += left_margin + (odd ? extra_odd : extra_even);
|
||||||
|
|
||||||
for (int c = 0; c < _columns.size (); ++c)
|
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||||
{
|
{
|
||||||
if (c)
|
if (c)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,13 +110,13 @@ std::string ViewText::render ()
|
||||||
// Determine minimal, ideal column widths.
|
// Determine minimal, ideal column widths.
|
||||||
std::vector <int> minimal;
|
std::vector <int> minimal;
|
||||||
std::vector <int> ideal;
|
std::vector <int> ideal;
|
||||||
for (int col = 0; col < _columns.size (); ++col)
|
for (unsigned int col = 0; col < _columns.size (); ++col)
|
||||||
{
|
{
|
||||||
// Headers factor in to width calculations.
|
// Headers factor in to width calculations.
|
||||||
int global_min = utf8_length (_columns[col]->getLabel ());
|
int global_min = utf8_length (_columns[col]->getLabel ());
|
||||||
int global_ideal = global_min;
|
int global_ideal = global_min;
|
||||||
|
|
||||||
for (int row = 0; row < _data.size (); ++row)
|
for (unsigned int row = 0; row < _data.size (); ++row)
|
||||||
{
|
{
|
||||||
// Determine minimum and ideal width for this column.
|
// Determine minimum and ideal width for this column.
|
||||||
int min;
|
int min;
|
||||||
|
@ -162,7 +162,7 @@ std::string ViewText::render ()
|
||||||
// Spread 'overage' among columns where width[i] < ideal[i]
|
// Spread 'overage' among columns where width[i] < ideal[i]
|
||||||
while (overage)
|
while (overage)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _columns.size () && overage; ++i)
|
for (unsigned int i = 0; i < _columns.size () && overage; ++i)
|
||||||
{
|
{
|
||||||
if (widths[i] < ideal[i])
|
if (widths[i] < ideal[i])
|
||||||
{
|
{
|
||||||
|
@ -174,9 +174,9 @@ std::string ViewText::render ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compose column headers.
|
// Compose column headers.
|
||||||
int max_lines = 0;
|
unsigned int max_lines = 0;
|
||||||
std::vector <std::vector <std::string> > headers;
|
std::vector <std::vector <std::string> > headers;
|
||||||
for (int c = 0; c < _columns.size (); ++c)
|
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||||
{
|
{
|
||||||
headers.push_back (std::vector <std::string> ());
|
headers.push_back (std::vector <std::string> ());
|
||||||
_columns[c]->renderHeader (headers[c], widths[c], _header);
|
_columns[c]->renderHeader (headers[c], widths[c], _header);
|
||||||
|
@ -199,11 +199,11 @@ std::string ViewText::render ()
|
||||||
std::string intra_odd = context.color () ? _intra_odd.colorize (intra) : intra;
|
std::string intra_odd = context.color () ? _intra_odd.colorize (intra) : intra;
|
||||||
std::string intra_even = context.color () ? _intra_even.colorize (intra) : intra;
|
std::string intra_even = context.color () ? _intra_even.colorize (intra) : intra;
|
||||||
|
|
||||||
for (int i = 0; i < max_lines; ++i)
|
for (unsigned int i = 0; i < max_lines; ++i)
|
||||||
{
|
{
|
||||||
out += left_margin + extra;
|
out += left_margin + extra;
|
||||||
|
|
||||||
for (int c = 0; c < _columns.size (); ++c)
|
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||||
{
|
{
|
||||||
if (c)
|
if (c)
|
||||||
out += intra;
|
out += intra;
|
||||||
|
@ -228,7 +228,7 @@ std::string ViewText::render ()
|
||||||
// Compose, render columns, in sequence.
|
// Compose, render columns, in sequence.
|
||||||
_rows = 0;
|
_rows = 0;
|
||||||
std::vector <std::vector <std::string> > cells;
|
std::vector <std::vector <std::string> > cells;
|
||||||
for (int row = 0; row < _data.size (); ++row)
|
for (unsigned int row = 0; row < _data.size (); ++row)
|
||||||
{
|
{
|
||||||
max_lines = 0;
|
max_lines = 0;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ std::string ViewText::render ()
|
||||||
// therefore there are only cell colors, not intra colors.
|
// therefore there are only cell colors, not intra colors.
|
||||||
|
|
||||||
Color cell_color;
|
Color cell_color;
|
||||||
for (int col = 0; col < _columns.size (); ++col)
|
for (unsigned int col = 0; col < _columns.size (); ++col)
|
||||||
{
|
{
|
||||||
if (context.color ())
|
if (context.color ())
|
||||||
{
|
{
|
||||||
|
@ -256,11 +256,11 @@ std::string ViewText::render ()
|
||||||
max_lines = cells[col].size ();
|
max_lines = cells[col].size ();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < max_lines; ++i)
|
for (unsigned int i = 0; i < max_lines; ++i)
|
||||||
{
|
{
|
||||||
out += left_margin + (odd ? extra_odd : extra_even);
|
out += left_margin + (odd ? extra_odd : extra_even);
|
||||||
|
|
||||||
for (int col = 0; col < _columns.size (); ++col)
|
for (unsigned int col = 0; col < _columns.size (); ++col)
|
||||||
{
|
{
|
||||||
if (col)
|
if (col)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,5 +28,5 @@ set (columns_SRCS Column.cpp Column.h
|
||||||
add_library (columns STATIC ${columns_SRCS})
|
add_library (columns STATIC ${columns_SRCS})
|
||||||
|
|
||||||
set (CMAKE_BUILD_TYPE debug)
|
set (CMAKE_BUILD_TYPE debug)
|
||||||
set (CMAKE_C_FLAGS_DEBUG "-ggdb3")
|
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3 -Wall")
|
||||||
set (CMAKE_C_FLAGS_RELEASE "-O3")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wall")
|
||||||
|
|
|
@ -75,7 +75,7 @@ void ColumnTags::measure (Task& task, int& minimum, int& maximum)
|
||||||
split (all, tags, ',');
|
split (all, tags, ',');
|
||||||
std::vector <std::string>::iterator i;
|
std::vector <std::string>::iterator i;
|
||||||
for (i = all.begin (); i != all.end (); ++i)
|
for (i = all.begin (); i != all.end (); ++i)
|
||||||
if (i->length () > minimum)
|
if ((int)i->length () > minimum)
|
||||||
minimum = i->length () + 1;
|
minimum = i->length () + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ ColumnUUID::~ColumnUUID ()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Set the minimum and maximum widths for the value.
|
// Set the minimum and maximum widths for the value.
|
||||||
void ColumnUUID::measure (Task& task, int& minimum, int& maximum)
|
void ColumnUUID::measure (Task&, int& minimum, int& maximum)
|
||||||
{
|
{
|
||||||
if (_style == "default") minimum = maximum = 36;
|
if (_style == "default") minimum = maximum = 36;
|
||||||
else if (_style == "short") minimum = maximum = 8;
|
else if (_style == "short") minimum = maximum = 8;
|
||||||
|
|
|
@ -174,25 +174,25 @@ void Column::renderHeader (
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Column::measure (const std::string& value, int& minimum, int& maximum)
|
void Column::measure (const std::string&, int&, int&)
|
||||||
{
|
{
|
||||||
throw std::string ("Virtual method Column::measure not overriden.");
|
throw std::string ("Virtual method Column::measure not overriden.");
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Column::measure (Task& task, int& minimum, int& maximum)
|
void Column::measure (Task&, int&, int&)
|
||||||
{
|
{
|
||||||
throw std::string ("Virtual method Column::measure not overriden.");
|
throw std::string ("Virtual method Column::measure not overriden.");
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Column::render (std::vector <std::string>& lines, const std::string& value, int width, Color& color)
|
void Column::render (std::vector <std::string>&, const std::string&, int, Color&)
|
||||||
{
|
{
|
||||||
throw std::string ("Virtual method Column::render not overriden.");
|
throw std::string ("Virtual method Column::render not overriden.");
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Column::render (std::vector <std::string>& lines, Task& task, int width, Color& color)
|
void Column::render (std::vector <std::string>&, Task&, int, Color&)
|
||||||
{
|
{
|
||||||
throw std::string ("Virtual method Column::render not overriden.");
|
throw std::string ("Virtual method Column::render not overriden.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,7 +280,7 @@ void handleUndo ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void handleMerge (std::string& outs)
|
void handleMerge (std::string&)
|
||||||
{
|
{
|
||||||
std::string file = trim (context.task.get ("description"));
|
std::string file = trim (context.task.get ("description"));
|
||||||
std::string pushfile = "";
|
std::string pushfile = "";
|
||||||
|
@ -337,7 +337,7 @@ void handleMerge (std::string& outs)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Transfers the local data (from rc.location.data) to the remote path. Because
|
// Transfers the local data (from rc.location.data) to the remote path. Because
|
||||||
// this is potentially on another machine, no checking can be performed.
|
// this is potentially on another machine, no checking can be performed.
|
||||||
void handlePush (std::string& outs)
|
void handlePush (std::string&)
|
||||||
{
|
{
|
||||||
std::string file = trim (context.task.get ("description"));
|
std::string file = trim (context.task.get ("description"));
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ void handlePush (std::string& outs)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void handlePull (std::string& outs)
|
void handlePull (std::string&)
|
||||||
{
|
{
|
||||||
std::string file = trim (context.task.get ("description"));
|
std::string file = trim (context.task.get ("description"));
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,5 @@ set (commands_SRCS Command.cpp Command.h
|
||||||
add_library (commands STATIC ${commands_SRCS})
|
add_library (commands STATIC ${commands_SRCS})
|
||||||
|
|
||||||
set (CMAKE_BUILD_TYPE debug)
|
set (CMAKE_BUILD_TYPE debug)
|
||||||
set (CMAKE_C_FLAGS_DEBUG "-ggdb3")
|
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3 -Wall")
|
||||||
set (CMAKE_C_FLAGS_RELEASE "-O3")
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wall")
|
||||||
|
|
|
@ -44,7 +44,7 @@ CmdAppend::CmdAppend ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdAppend::execute (const std::string& command_line, std::string& output)
|
int CmdAppend::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
if (!context.task.has ("description"))
|
if (!context.task.has ("description"))
|
||||||
throw std::string ("Additional text must be provided.");
|
throw std::string ("Additional text must be provided.");
|
||||||
|
|
|
@ -45,7 +45,7 @@ CmdCompletionCommands::CmdCompletionCommands ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCompletionCommands::execute (const std::string& command_line, std::string& output)
|
int CmdCompletionCommands::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
// Get a list of all commands.
|
// Get a list of all commands.
|
||||||
std::vector <std::string> commands;
|
std::vector <std::string> commands;
|
||||||
|
@ -81,7 +81,7 @@ CmdZshCommands::CmdZshCommands ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdZshCommands::execute (const std::string& command_line, std::string& output)
|
int CmdZshCommands::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
// Get a list of all commands.
|
// Get a list of all commands.
|
||||||
std::vector <std::string> commands;
|
std::vector <std::string> commands;
|
||||||
|
|
|
@ -43,7 +43,7 @@ CmdCount::CmdCount ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCount::execute (const std::string& command_line, std::string& output)
|
int CmdCount::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
// Scan the pending tasks, applying any filter.
|
// Scan the pending tasks, applying any filter.
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
|
|
|
@ -51,7 +51,7 @@ CmdCustom::CmdCustom (
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCustom::execute (const std::string& command_line, std::string& output)
|
int CmdCustom::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ int CmdCustom::execute (const std::string& command_line, std::string& output)
|
||||||
|
|
||||||
// Sort the tasks.
|
// Sort the tasks.
|
||||||
std::vector <int> sequence;
|
std::vector <int> sequence;
|
||||||
for (int i = 0; i < tasks.size (); ++i)
|
for (unsigned int i = 0; i < tasks.size (); ++i)
|
||||||
sequence.push_back (i);
|
sequence.push_back (i);
|
||||||
|
|
||||||
sort_tasks (tasks, sequence, reportSort);
|
sort_tasks (tasks, sequence, reportSort);
|
||||||
|
@ -140,7 +140,7 @@ int CmdCustom::execute (const std::string& command_line, std::string& output)
|
||||||
view.intraColorOdd (alternate);
|
view.intraColorOdd (alternate);
|
||||||
|
|
||||||
// Add the columns and labels.
|
// Add the columns and labels.
|
||||||
for (int i = 0; i < columns.size (); ++i)
|
for (unsigned int i = 0; i < columns.size (); ++i)
|
||||||
{
|
{
|
||||||
Column* c = Column::factory (columns[i], _keyword);
|
Column* c = Column::factory (columns[i], _keyword);
|
||||||
c->setLabel (labels[i]);
|
c->setLabel (labels[i]);
|
||||||
|
@ -179,10 +179,10 @@ int CmdCustom::execute (const std::string& command_line, std::string& output)
|
||||||
<< tasks.size ()
|
<< tasks.size ()
|
||||||
<< (tasks.size () == 1 ? " task" : " tasks");
|
<< (tasks.size () == 1 ? " task" : " tasks");
|
||||||
|
|
||||||
if (maxrows && maxrows < tasks.size ())
|
if (maxrows && maxrows < (int)tasks.size ())
|
||||||
out << ", " << maxrows << " shown";
|
out << ", " << maxrows << " shown";
|
||||||
|
|
||||||
if (maxlines && maxlines < tasks.size ())
|
if (maxlines && maxlines < (int)tasks.size ())
|
||||||
out << ", truncated to " << maxlines - table_header << " lines";
|
out << ", truncated to " << maxlines - table_header << " lines";
|
||||||
|
|
||||||
out << "\n";
|
out << "\n";
|
||||||
|
|
|
@ -63,7 +63,7 @@ CmdDiagnostics::CmdDiagnostics ()
|
||||||
//
|
//
|
||||||
// Although this will change over time, initially this command will answer the
|
// Although this will change over time, initially this command will answer the
|
||||||
// kind of questions we always have to ask whenever something is wrong.
|
// kind of questions we always have to ask whenever something is wrong.
|
||||||
int CmdDiagnostics::execute (const std::string& command_line, std::string& output)
|
int CmdDiagnostics::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
Color bold ("bold");
|
Color bold ("bold");
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ CmdEdit::CmdEdit ()
|
||||||
// Introducing the Silver Bullet. This feature is the catch-all fixative for
|
// Introducing the Silver Bullet. This feature is the catch-all fixative for
|
||||||
// various other ills. This is like opening up the hood and going in with a
|
// various other ills. This is like opening up the hood and going in with a
|
||||||
// wrench. To be used sparingly.
|
// wrench. To be used sparingly.
|
||||||
int CmdEdit::execute (const std::string& command_line, std::string& output)
|
int CmdEdit::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ CmdExec::CmdExec ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdExec::execute (const std::string& command_line, std::string& output)
|
int CmdExec::execute (const std::string& command_line, std::string&)
|
||||||
{
|
{
|
||||||
return system (command_line.c_str ());
|
return system (command_line.c_str ());
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ CmdHelp::CmdHelp ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdHelp::execute (const std::string& command_line, std::string& output)
|
int CmdHelp::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
ViewText view;
|
ViewText view;
|
||||||
view.width (context.getWidth ());
|
view.width (context.getWidth ());
|
||||||
|
|
|
@ -46,7 +46,7 @@ CmdHistoryMonthly::CmdHistoryMonthly ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdHistoryMonthly::execute (const std::string& command_line, std::string& output)
|
int CmdHistoryMonthly::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::map <time_t, int> groups; // Represents any month with data
|
std::map <time_t, int> groups; // Represents any month with data
|
||||||
|
@ -202,7 +202,7 @@ CmdHistoryAnnual::CmdHistoryAnnual ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdHistoryAnnual::execute (const std::string& command_line, std::string& output)
|
int CmdHistoryAnnual::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::map <time_t, int> groups; // Represents any month with data
|
std::map <time_t, int> groups; // Represents any month with data
|
||||||
|
@ -355,7 +355,7 @@ CmdGHistoryMonthly::CmdGHistoryMonthly ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdGHistoryMonthly::execute (const std::string& command_line, std::string& output)
|
int CmdGHistoryMonthly::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::map <time_t, int> groups; // Represents any month with data
|
std::map <time_t, int> groups; // Represents any month with data
|
||||||
|
@ -551,7 +551,7 @@ CmdGHistoryAnnual::CmdGHistoryAnnual ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdGHistoryAnnual::execute (const std::string& command_line, std::string& output)
|
int CmdGHistoryAnnual::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::map <time_t, int> groups; // Represents any month with data
|
std::map <time_t, int> groups; // Represents any month with data
|
||||||
|
|
|
@ -45,7 +45,7 @@ CmdIDs::CmdIDs ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdIDs::execute (const std::string& command_line, std::string& output)
|
int CmdIDs::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
// Scan the pending tasks, applying any filter.
|
// Scan the pending tasks, applying any filter.
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
|
@ -78,7 +78,7 @@ CmdCompletionIds::CmdCompletionIds ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCompletionIds::execute (const std::string& command_line, std::string& output)
|
int CmdCompletionIds::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
context.tdb.lock (context.config.getBoolean ("locking"));
|
||||||
|
@ -116,7 +116,7 @@ CmdZshCompletionIds::CmdZshCompletionIds ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdZshCompletionIds::execute (const std::string& command_line, std::string& output)
|
int CmdZshCompletionIds::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
context.tdb.lock (context.config.getBoolean ("locking"));
|
||||||
|
|
|
@ -47,7 +47,7 @@ CmdInfo::CmdInfo ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdInfo::execute (const std::string& command_line, std::string& output)
|
int CmdInfo::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ CmdInstall::CmdInstall ()
|
||||||
// Generate UUID
|
// Generate UUID
|
||||||
// Call the "install" function once, store results in rc:
|
// Call the "install" function once, store results in rc:
|
||||||
// extension.<uuid>=<JSON>
|
// extension.<uuid>=<JSON>
|
||||||
int CmdInstall::execute (const std::string& commandLine, std::string& output)
|
int CmdInstall::execute (const std::string&, std::string&)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ CmdLogo::CmdLogo ()
|
||||||
// Generate UUID
|
// Generate UUID
|
||||||
// Call the "install" function once, store results in rc:
|
// Call the "install" function once, store results in rc:
|
||||||
// extension.<uuid>=<JSON>
|
// extension.<uuid>=<JSON>
|
||||||
int CmdLogo::execute (const std::string& commandLine, std::string& output)
|
int CmdLogo::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
static const char* data[] =
|
static const char* data[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,7 +44,7 @@ CmdPrepend::CmdPrepend ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdPrepend::execute (const std::string& command_line, std::string& output)
|
int CmdPrepend::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
if (!context.task.has ("description"))
|
if (!context.task.has ("description"))
|
||||||
throw std::string ("Additional text must be provided.");
|
throw std::string ("Additional text must be provided.");
|
||||||
|
|
|
@ -44,7 +44,7 @@ CmdProjects::CmdProjects ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdProjects::execute (const std::string& command_line, std::string& output)
|
int CmdProjects::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
|
@ -142,7 +142,7 @@ CmdCompletionProjects::CmdCompletionProjects ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCompletionProjects::execute (const std::string& command_line, std::string& output)
|
int CmdCompletionProjects::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
context.tdb.lock (context.config.getBoolean ("locking"));
|
||||||
|
|
|
@ -45,7 +45,7 @@ CmdShell::CmdShell ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdShell::execute (const std::string& command_line, std::string& output)
|
int CmdShell::execute (const std::string&, std::string&)
|
||||||
{
|
{
|
||||||
// Display some kind of welcome message.
|
// Display some kind of welcome message.
|
||||||
Color bold (Color::nocolor, Color::nocolor, false, true, false);
|
Color bold (Color::nocolor, Color::nocolor, false, true, false);
|
||||||
|
|
|
@ -50,7 +50,7 @@ CmdShow::CmdShow ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdShow::execute (const std::string& command_line, std::string& output)
|
int CmdShow::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
|
|
|
@ -49,7 +49,7 @@ CmdStatistics::CmdStatistics ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdStatistics::execute (const std::string& command_line, std::string& output)
|
int CmdStatistics::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
|
|
|
@ -46,7 +46,7 @@ CmdTags::CmdTags ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdTags::execute (const std::string& command_line, std::string& output)
|
int CmdTags::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
|
@ -131,7 +131,7 @@ CmdCompletionTags::CmdCompletionTags ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCompletionTags::execute (const std::string& command_line, std::string& output)
|
int CmdCompletionTags::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
context.tdb.lock (context.config.getBoolean ("locking"));
|
||||||
|
|
|
@ -44,7 +44,7 @@ CmdUrgency::CmdUrgency ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdUrgency::execute (const std::string& command_line, std::string& output)
|
int CmdUrgency::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
// Get all the tasks.
|
// Get all the tasks.
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
|
|
|
@ -46,7 +46,7 @@ CmdVersion::CmdVersion ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdVersion::execute (const std::string& command_line, std::string& output)
|
int CmdVersion::execute (const std::string&, std::string& output)
|
||||||
{
|
{
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ CmdCompletionVersion::CmdCompletionVersion ()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCompletionVersion::execute (
|
int CmdCompletionVersion::execute (
|
||||||
const std::string& command_line,
|
const std::string&,
|
||||||
std::string& output)
|
std::string& output)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMMIT
|
#ifdef HAVE_COMMIT
|
||||||
|
|
|
@ -291,8 +291,10 @@ std::string renderAttribute (const std::string& name, const std::string& value)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// TODO Implement all the post-command feedback here. This includes project
|
// TODO Implement all the post-command feedback here. This includes project
|
||||||
// completion percentages, "3 tasks modified", all warnings, and so on.
|
// completion percentages, "3 tasks modified", all warnings, and so on.
|
||||||
std::string feedback (const Task& before, const Task& after)
|
std::string feedback (const Task&, const Task&)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -67,7 +67,6 @@ void sort_tasks (
|
||||||
// Essentially a static implementation of a dynamic operator<.
|
// Essentially a static implementation of a dynamic operator<.
|
||||||
static bool sort_compare (int left, int right)
|
static bool sort_compare (int left, int right)
|
||||||
{
|
{
|
||||||
int result;
|
|
||||||
std::string field;
|
std::string field;
|
||||||
bool ascending;
|
bool ascending;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue