forked from qt-creator/qt-creator
Beautifier: tr()-Fixes
Do not use QObject::tr(). Change-Id: Ib77f78ead649bcfee326fb9f8acde1df7784437b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Takumi ASAKI
parent
bb7925b4ef
commit
83d958ae4e
@@ -78,7 +78,7 @@ FormatTask format(FormatTask task)
|
|||||||
sourceFile.setAutoRemove(true);
|
sourceFile.setAutoRemove(true);
|
||||||
sourceFile.write(task.sourceData.toUtf8());
|
sourceFile.write(task.sourceData.toUtf8());
|
||||||
if (!sourceFile.finalize()) {
|
if (!sourceFile.finalize()) {
|
||||||
task.error = QObject::tr("Cannot create temporary file \"%1\": %2.")
|
task.error = BeautifierPlugin::tr("Cannot create temporary file \"%1\": %2.")
|
||||||
.arg(sourceFile.fileName()).arg(sourceFile.errorString());
|
.arg(sourceFile.fileName()).arg(sourceFile.errorString());
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ FormatTask format(FormatTask task)
|
|||||||
process.start(executable, options);
|
process.start(executable, options);
|
||||||
if (!process.waitForFinished(5000)) {
|
if (!process.waitForFinished(5000)) {
|
||||||
process.kill();
|
process.kill();
|
||||||
task.error = QObject::tr("Cannot call %1 or some other error occurred. Timeout "
|
task.error = BeautifierPlugin::tr("Cannot call %1 or some other error occurred. Timeout "
|
||||||
"reached while formatting file %2.")
|
"reached while formatting file %2.")
|
||||||
.arg(executable).arg(task.filePath);
|
.arg(executable).arg(task.filePath);
|
||||||
return task;
|
return task;
|
||||||
@@ -102,7 +102,7 @@ FormatTask format(FormatTask task)
|
|||||||
// Read text back
|
// Read text back
|
||||||
Utils::FileReader reader;
|
Utils::FileReader reader;
|
||||||
if (!reader.fetch(sourceFile.fileName(), QIODevice::Text)) {
|
if (!reader.fetch(sourceFile.fileName(), QIODevice::Text)) {
|
||||||
task.error = QObject::tr("Cannot read file \"%1\": %2.")
|
task.error = BeautifierPlugin::tr("Cannot read file \"%1\": %2.")
|
||||||
.arg(sourceFile.fileName()).arg(reader.errorString());
|
.arg(sourceFile.fileName()).arg(reader.errorString());
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ FormatTask format(FormatTask task)
|
|||||||
options.replaceInStrings("%file", task.filePath);
|
options.replaceInStrings("%file", task.filePath);
|
||||||
process.start(executable, options);
|
process.start(executable, options);
|
||||||
if (!process.waitForStarted(3000)) {
|
if (!process.waitForStarted(3000)) {
|
||||||
task.error = QObject::tr("Cannot call %1 or some other error occurred.")
|
task.error = BeautifierPlugin::tr("Cannot call %1 or some other error occurred.")
|
||||||
.arg(executable);
|
.arg(executable);
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ FormatTask format(FormatTask task)
|
|||||||
process.closeWriteChannel();
|
process.closeWriteChannel();
|
||||||
if (!process.waitForFinished(5000)) {
|
if (!process.waitForFinished(5000)) {
|
||||||
process.kill();
|
process.kill();
|
||||||
task.error = QObject::tr("Cannot call %1 or some other error occurred. Timeout "
|
task.error = BeautifierPlugin::tr("Cannot call %1 or some other error occurred. Timeout "
|
||||||
"reached while formatting file %2.")
|
"reached while formatting file %2.")
|
||||||
.arg(executable).arg(task.filePath);
|
.arg(executable).arg(task.filePath);
|
||||||
return task;
|
return task;
|
||||||
|
Reference in New Issue
Block a user