Task: Update Task to use Utils::FileName and Core::Id

Use Utils::FileName and Core::Id in Task structure.

Change-Id: Ia0ed459f86df36ffe547abde7c240b0ac409bcf5
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2012-01-26 13:38:25 +01:00
parent 2f021edfdd
commit 97496df1bf
44 changed files with 410 additions and 397 deletions

View File

@@ -49,8 +49,9 @@ Task::Task() : taskId(0), type(Unknown), line(-1)
{ }
Task::Task(TaskType type_, const QString &description_,
const QString &file_, int line_, const QString &category_) :
taskId(s_nextId), type(type_), description(description_), file(QDir::fromNativeSeparators(file_)), line(line_), category(category_)
const Utils::FileName &file_, int line_, const Core::Id &category_) :
taskId(s_nextId), type(type_), description(description_),
file(file_), line(line_), category(category_)
{
++s_nextId;
}
@@ -80,9 +81,9 @@ bool operator<(const Task &a, const Task &b)
// Can't happen
return true;
} else {
if (a.category < b.category)
if (a.category.uniqueIdentifier() < b.category.uniqueIdentifier())
return true;
if (b.category < a.category)
if (b.category.uniqueIdentifier() < a.category.uniqueIdentifier())
return false;
return a.taskId < b.taskId;
}