ProjectManager: Add convenience Task subclasses

For Compile, BuildSystem and Deployment. Unclutters user code and reduces
binary size.

Change-Id: Ia18e917bb411754162e9f4ec6056d752a020bb50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-01-15 08:56:11 +01:00
parent 7e19d1af7c
commit 0334b6e491
56 changed files with 1233 additions and 1548 deletions

View File

@@ -39,8 +39,7 @@ void LldParser::stdError(const QString &line)
{
const QString trimmedLine = rightTrimmed(line);
if (trimmedLine.contains("error:") && trimmedLine.contains("lld")) {
emit addTask({Task::Error, trimmedLine, Utils::FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE});
emit addTask(CompileTask(Task::Error, trimmedLine));
return;
}
static const QStringList prefixes{">>> referenced by ", ">>> defined at ", ">>> "};
@@ -65,8 +64,7 @@ void LldParser::stdError(const QString &line)
const int filePathLen = locOffset == -1 ? -1 : locOffset - filePathOffset;
const auto file = Utils::FilePath::fromUserInput(
trimmedLine.mid(filePathOffset, filePathLen).trimmed());
emit addTask({Task::Unknown, trimmedLine.mid(4).trimmed(), file, lineNo,
Constants::TASK_CATEGORY_COMPILE});
emit addTask(CompileTask(Task::Unknown, trimmedLine.mid(4).trimmed(), file, lineNo));
return;
}
IOutputParser::stdError(line);