forked from qt-creator/qt-creator
Qbs: Avoid a FilePath/String round trip
... when creating tasks in the clean step Change-Id: I563d126416d266eff0b95baa4deb3133cb3e3dc9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -119,7 +119,7 @@ void QbsCleanStep::cleaningDone(const ErrorInfo &error)
|
|||||||
m_session = nullptr;
|
m_session = nullptr;
|
||||||
|
|
||||||
for (const ErrorInfoItem &item : error.items)
|
for (const ErrorInfoItem &item : error.items)
|
||||||
createTaskAndOutput(Task::Error, item.description, item.filePath.toString(), item.line);
|
createTaskAndOutput(Task::Error, item.description, item.filePath, item.line);
|
||||||
emit finished(!error.hasError());
|
emit finished(!error.hasError());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,10 +135,11 @@ void QbsCleanStep::handleProgress(int value)
|
|||||||
emit progress(value * 100 / m_maxProgress, m_description);
|
emit progress(value * 100 / m_maxProgress, m_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsCleanStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type, const QString &message, const QString &file, int line)
|
void QbsCleanStep::createTaskAndOutput(Task::TaskType type, const QString &message,
|
||||||
|
const FilePath &file, int line)
|
||||||
{
|
{
|
||||||
emit addOutput(message, OutputFormat::Stdout);
|
emit addOutput(message, OutputFormat::Stdout);
|
||||||
emit addTask(CompileTask(type, message, Utils::FilePath::fromString(file), line), 1);
|
emit addTask(CompileTask(type, message, file, line), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
@@ -38,7 +38,7 @@ private:
|
|||||||
void handleProgress(int value);
|
void handleProgress(int value);
|
||||||
|
|
||||||
void createTaskAndOutput(ProjectExplorer::Task::TaskType type,
|
void createTaskAndOutput(ProjectExplorer::Task::TaskType type,
|
||||||
const QString &message, const QString &file, int line);
|
const QString &message, const Utils::FilePath &file, int line);
|
||||||
|
|
||||||
Utils::BoolAspect dryRun{this};
|
Utils::BoolAspect dryRun{this};
|
||||||
Utils::BoolAspect keepGoing{this};
|
Utils::BoolAspect keepGoing{this};
|
||||||
|
Reference in New Issue
Block a user