forked from qt-creator/qt-creator
Beautifier: Fix Qt4 compile.
Change-Id: Ifbd01628b28abe6879d30d43f8bd1f389988086f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
@@ -135,14 +135,15 @@ QString BeautifierPlugin::format(const QString &text, QStringList command, const
|
||||
// Format temporary file
|
||||
QProcess process;
|
||||
command.replaceInStrings(QLatin1String("%file"), sourceFile.fileName());
|
||||
process.start(command.takeFirst(), command);
|
||||
const QString processProgram = command.takeFirst();
|
||||
process.start(processProgram, command);
|
||||
if (!process.waitForFinished()) {
|
||||
showError(tr("Failed to call %1 or an error occurred.").arg(process.program()));
|
||||
showError(tr("Failed to call %1 or an error occurred.").arg(processProgram));
|
||||
return QString();
|
||||
}
|
||||
const QByteArray output = process.readAllStandardError();
|
||||
if (!output.isEmpty())
|
||||
showError(process.program() + QLatin1String(": ") + QString::fromLocal8Bit(output));
|
||||
showError(processProgram + QLatin1String(": ") + QString::fromLocal8Bit(output));
|
||||
|
||||
// Read text back
|
||||
Utils::FileReader reader;
|
||||
|
||||
Reference in New Issue
Block a user