From 9db70d8810dbee8c3b54e4d69f9dfcee27f90259 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 7 Feb 2023 22:46:35 +0100 Subject: Translations: Fix stray QApplication::translate() calls For references to the module-own context, use Tr::tr(). For references to other modules, use the right context name (with "::" prefix). Change-Id: I6dce8f1ceccb23c44d93f1826402cd3be8e98e5a Reviewed-by: Eike Ziller --- src/plugins/clangcodemodel/clangutils.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/clangcodemodel/clangutils.cpp') diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index f577cbed4b..f236fa81b0 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -154,15 +154,14 @@ GenerateCompilationDbResult generateCompilationDB(QList p FilePath clangIncludeDir) { QTC_ASSERT(!baseDir.isEmpty(), return GenerateCompilationDbResult(QString(), - QCoreApplication::translate("ClangUtils", "Could not retrieve build directory."))); + Tr::tr("Could not retrieve build directory."))); QTC_ASSERT(!projectInfoList.isEmpty(), return GenerateCompilationDbResult(QString(), "Could not retrieve project info.")); QTC_CHECK(baseDir.ensureWritableDir()); QFile compileCommandsFile(baseDir.pathAppended("compile_commands.json").toFSPathString()); const bool fileOpened = compileCommandsFile.open(QIODevice::WriteOnly | QIODevice::Truncate); if (!fileOpened) { - return GenerateCompilationDbResult(QString(), - QCoreApplication::translate("ClangUtils", "Could not create \"%1\": %2") + return GenerateCompilationDbResult(QString(), Tr::tr("Could not create \"%1\": %2") .arg(compileCommandsFile.fileName(), compileCommandsFile.errorString())); } compileCommandsFile.write("["); -- cgit v1.2.1