From 83d958ae4e05d30b79a8c15c4430577e785c2844 Mon Sep 17 00:00:00 2001
From: Takumi ASAKI <asaki@sra.co.jp>
Date: Tue, 26 Apr 2016 15:30:23 +0900
Subject: [PATCH] Beautifier: tr()-Fixes

Do not use QObject::tr().

Change-Id: Ib77f78ead649bcfee326fb9f8acde1df7784437b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
---
 src/plugins/beautifier/beautifierplugin.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp
index 9848046d757..508a5117422 100644
--- a/src/plugins/beautifier/beautifierplugin.cpp
+++ b/src/plugins/beautifier/beautifierplugin.cpp
@@ -78,7 +78,7 @@ FormatTask format(FormatTask task)
         sourceFile.setAutoRemove(true);
         sourceFile.write(task.sourceData.toUtf8());
         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());
             return task;
         }
@@ -90,7 +90,7 @@ FormatTask format(FormatTask task)
         process.start(executable, options);
         if (!process.waitForFinished(5000)) {
             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.")
                     .arg(executable).arg(task.filePath);
             return task;
@@ -102,7 +102,7 @@ FormatTask format(FormatTask task)
         // Read text back
         Utils::FileReader reader;
         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());
             return task;
         }
@@ -117,7 +117,7 @@ FormatTask format(FormatTask task)
         options.replaceInStrings("%file", task.filePath);
         process.start(executable, options);
         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);
             return task;
         }
@@ -125,7 +125,7 @@ FormatTask format(FormatTask task)
         process.closeWriteChannel();
         if (!process.waitForFinished(5000)) {
             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.")
                     .arg(executable).arg(task.filePath);
             return task;
-- 
GitLab