Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -32,12 +32,10 @@ ...@@ -32,12 +32,10 @@
namespace ProjectExplorer namespace ProjectExplorer
{ {
unsigned int Task::s_nextId = 0; unsigned int Task::s_nextId = 1;
Task::Task() : taskId(s_nextId), type(Unknown), line(-1) Task::Task() : taskId(0), type(Unknown), line(-1)
{ { }
++s_nextId;
}
Task::Task(TaskType type_, const QString &description_, Task::Task(TaskType type_, const QString &description_,
const QString &file_, int line_, const QString &category_) : const QString &file_, int line_, const QString &category_) :
...@@ -47,6 +45,9 @@ Task::Task(TaskType type_, const QString &description_, ...@@ -47,6 +45,9 @@ Task::Task(TaskType type_, const QString &description_,
++s_nextId; ++s_nextId;
} }
bool Task::isNull() const
{ return taskId == 0; }
// //
// functions // functions
// //
......
...@@ -52,6 +52,8 @@ public: ...@@ -52,6 +52,8 @@ public:
Task(TaskType type_, const QString &description_, Task(TaskType type_, const QString &description_,
const QString &file_, int line_, const QString &category_); const QString &file_, int line_, const QString &category_);
bool isNull() const;
unsigned int taskId; unsigned int taskId;
TaskType type; TaskType type;
QString description; QString description;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment