forked from qt-creator/qt-creator
Qbs: Avoid a FilePath<->QString roundtrip in QbsInstallStep
Change-Id: I8366fc694ba899bf74e0fea8e85aa99e709a57b4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -182,7 +182,7 @@ void QbsInstallStep::installDone(const ErrorInfo &error)
|
||||
m_session = nullptr;
|
||||
|
||||
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());
|
||||
}
|
||||
@@ -199,10 +199,10 @@ void QbsInstallStep::handleProgress(int value)
|
||||
emit progress(value * 100 / m_maxProgress, m_description);
|
||||
}
|
||||
|
||||
void QbsInstallStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type,
|
||||
const QString &message, const QString &file, int line)
|
||||
void QbsInstallStep::createTaskAndOutput(Task::TaskType type, const QString &message,
|
||||
const Utils::FilePath &file, int line)
|
||||
{
|
||||
const CompileTask task(type, message, Utils::FilePath::fromString(file), line);
|
||||
const CompileTask task(type, message, file, line);
|
||||
emit addTask(task, 1);
|
||||
emit addOutput(message, OutputFormat::Stdout);
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ private:
|
||||
void handleProgress(int value);
|
||||
|
||||
void createTaskAndOutput(ProjectExplorer::Task::TaskType type,
|
||||
const QString &message, const QString &file, int line);
|
||||
const QString &message, const Utils::FilePath &file, int line);
|
||||
|
||||
void setRemoveFirst(bool rf);
|
||||
void setDryRun(bool dr);
|
||||
|
Reference in New Issue
Block a user