forked from qt-creator/qt-creator
Use Utils::FilePath in SynchronousProcess
Adapt callers and surrounding code. Change-Id: Ie6c1883a44169cf9d790d06b660f46d24dc24c89 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -90,7 +90,8 @@ static FormatTask format(FormatTask task)
|
||||
options.replaceInStrings(QLatin1String("%file"), sourceFile.fileName());
|
||||
Utils::SynchronousProcess process;
|
||||
process.setTimeoutS(5);
|
||||
Utils::SynchronousProcessResponse response = process.runBlocking(executable, options);
|
||||
const CommandLine cmd(FilePath::fromString(executable), {options});
|
||||
Utils::SynchronousProcessResponse response = process.runBlocking(cmd);
|
||||
if (response.result != Utils::SynchronousProcessResponse::Finished) {
|
||||
task.error = QString(QT_TRANSLATE_NOOP("TextEditor", "Failed to format: %1."))
|
||||
.arg(response.exitMessage(executable, 5));
|
||||
|
||||
Reference in New Issue
Block a user