forked from qt-creator/qt-creator
Task: Add clear method
Avoid needless increments of the task id counter for Task(). Change-Id: I6243b4fe9e8fd91653e236722282fa8f8a9ed82d Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -59,6 +59,17 @@ void Task::addMark(TextEditor::BaseTextMark *mark)
|
||||
bool Task::isNull() const
|
||||
{ return taskId == 0; }
|
||||
|
||||
void Task::clear()
|
||||
{
|
||||
taskId = 0;
|
||||
description.clear();
|
||||
file = Utils::FileName();
|
||||
line = -1;
|
||||
movedLine = -1;
|
||||
category = Core::Id();
|
||||
type = Task::Unknown;
|
||||
}
|
||||
|
||||
//
|
||||
// functions
|
||||
//
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
const Utils::FileName &file_, int line_, const Core::Id &category_);
|
||||
|
||||
bool isNull() const;
|
||||
void clear();
|
||||
|
||||
unsigned int taskId;
|
||||
TaskType type;
|
||||
|
||||
Reference in New Issue
Block a user