Commit 4960366b authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Null task

 * Add a way to have a null-task which is invalid for evaluation
parent 16adcc48
......@@ -32,12 +32,10 @@
namespace ProjectExplorer
{
unsigned int Task::s_nextId = 0;
unsigned int Task::s_nextId = 1;
Task::Task() : taskId(s_nextId), type(Unknown), line(-1)
{
++s_nextId;
}
Task::Task() : taskId(0), type(Unknown), line(-1)
{ }
Task::Task(TaskType type_, const QString &description_,
const QString &file_, int line_, const QString &category_) :
......@@ -47,6 +45,9 @@ Task::Task(TaskType type_, const QString &description_,
++s_nextId;
}
bool Task::isNull() const
{ return taskId == 0; }
//
// functions
//
......
......@@ -52,6 +52,8 @@ public:
Task(TaskType type_, const QString &description_,
const QString &file_, int line_, const QString &category_);
bool isNull() const;
unsigned int taskId;
TaskType type;
QString description;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment