forked from qt-creator/qt-creator
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 <eike.ziller@qt.io>
This commit is contained in:
@@ -154,15 +154,14 @@ GenerateCompilationDbResult generateCompilationDB(QList<ProjectInfo::ConstPtr> 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("[");
|
||||
|
||||
Reference in New Issue
Block a user