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:
@@ -121,8 +121,7 @@ void disableDiagnosticInCurrentProjectConfig(const ClangDiagnostic &diagnostic)
|
||||
|
||||
// Create copy if needed
|
||||
if (config.isReadOnly()) {
|
||||
const QString name = QCoreApplication::translate("ClangDiagnosticConfig",
|
||||
"Project: %1 (based on %2)")
|
||||
const QString name = Tr::tr("Project: %1 (based on %2)")
|
||||
.arg(project->displayName(), config.displayName());
|
||||
config = ClangDiagnosticConfigsModel::createCustomConfig(config, name);
|
||||
}
|
||||
@@ -141,9 +140,7 @@ void disableDiagnosticInCurrentProjectConfig(const ClangDiagnostic &diagnostic)
|
||||
projectSettings.setDiagnosticConfigId(config.id());
|
||||
|
||||
// Notify the user about changed project specific settings
|
||||
const QString text
|
||||
= QCoreApplication::translate("ClangDiagnosticConfig",
|
||||
"Changes applied in Projects Mode > Clang Code Model");
|
||||
const QString text = Tr::tr("Changes applied in Projects Mode > Clang Code Model");
|
||||
FadingIndicator::showText(Core::ICore::mainWindow(),
|
||||
text,
|
||||
FadingIndicator::SmallText);
|
||||
|
||||
@@ -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