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

@@ -371,7 +371,7 @@ void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task)
return;
Task editable(task);
QString filePath = QDir::cleanPath(task.file.trimmed());
QString filePath = task.file.toString();
if (!filePath.isEmpty() && !QDir::isAbsolutePath(filePath)) {
// We have no save way to decide which file in which subfolder
// is meant. Therefore we apply following heuristics:
@@ -388,7 +388,7 @@ void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task)
}
if (possibleFiles.count() == 1) {
editable.file = possibleFiles.first().filePath();
editable.file = Utils::FileName(possibleFiles.first());
} else {
// More then one filename, so do a better compare
// Chop of any "../"
@@ -403,7 +403,7 @@ void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task)
}
}
if (count == 1)
editable.file = possibleFilePath;
editable.file = Utils::FileName::fromString(possibleFilePath);
else
qWarning() << "Could not find absolute location of file " << filePath;
}