Use IDE_DISPLAY_NAME

Change-Id: If8ae9399a40a460b535faeec2320d1450e5099c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Robert Loehning
2020-07-31 17:41:28 +02:00
parent 4bfdc125ef
commit 64a641ec6a
7 changed files with 26 additions and 11 deletions

View File

@@ -31,6 +31,8 @@
#include "androidmanager.h"
#include "adbcommandswidget.h"
#include <app/app_version.h>
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
@@ -123,7 +125,8 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *target, Utils::Id id)
warning->setDisplayStyle(BaseStringAspect::LabelDisplay);
warning->setLabelPixmap(Icons::WARNING.pixmap());
warning->setValue(tr("If the \"am start\" options conflict, the application might not start.\n"
"Qt Creator uses: am start -n <package_name>/<Activity_name> [-D]."));
"%1 uses: am start -n <package_name>/<Activity_name> [-D].")
.arg(Core::Constants::IDE_DISPLAY_NAME));
auto preStartShellCmdAspect = addAspect<BaseStringListAspect>();
preStartShellCmdAspect->setId(Constants::ANDROID_PRESTARTSHELLCMDLIST);

View File

@@ -29,6 +29,7 @@
#include "androidsdkmanager.h"
#include "androidsdkmodel.h"
#include <app/app_version.h>
#include <utils/runextensions.h>
#include <utils/outputformatter.h>
#include <utils/runextensions.h>
@@ -168,8 +169,9 @@ void AndroidSdkManagerWidget::installEssentials()
if (!m_sdkModel->missingEssentials().isEmpty()) {
QMessageBox::warning(this,
tr("Android SDK Changes"),
tr("Qt Creator couldn't find the following essential packages: \"%1\".\n"
tr("%1 couldn't find the following essential packages: \"%2\".\n"
"Install them manually after the current operation is done.\n")
.arg(Core::Constants::IDE_DISPLAY_NAME)
.arg(m_sdkModel->missingEssentials().join("\", \"")));
}
onApplyButton();

View File

@@ -25,6 +25,7 @@
#include "fileapiparser.h"
#include <app/app_version.h>
#include <coreplugin/messagemanager.h>
#include <projectexplorer/rawprojectpart.h>
@@ -62,7 +63,8 @@ static void reportFileApiSetupFailure()
{
Core::MessageManager::write(QCoreApplication::translate(
"CMakeProjectManager::Internal",
"Failed to set up CMake file API support. Qt Creator cannot extract project information."));
"Failed to set up CMake file API support. %1 cannot "
"extract project information.").arg(Core::Constants::IDE_DISPLAY_NAME));
}
static std::pair<int, int> cmakeVersion(const QJsonObject &obj)

View File

@@ -27,6 +27,8 @@
#include "perfprofilerplugin.h"
#include "perfprofilertracefile.h"
#include <app/app_version.h>
#include <QFile>
#include <QtEndian>
@@ -268,9 +270,10 @@ void PerfProfilerTraceFile::readFromDevice()
} else {
fail(tr("Invalid data format. The trace file's identification string is \"%1\"."
"An acceptable trace file should have \"%2\". You cannot read trace files "
"generated with older versions of Qt Creator.")
"generated with older versions of %3.")
.arg(QString::fromLatin1(magic))
.arg(QString::fromLatin1(Constants::PerfZqfileMagic)));
.arg(QString::fromLatin1(Constants::PerfZqfileMagic)
.arg(Core::Constants::IDE_DISPLAY_NAME)));
return;
}

View File

@@ -33,6 +33,7 @@
#include "session.h"
#include "target.h"
#include <app/app_version.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/icore.h>
@@ -479,8 +480,9 @@ public:
setWindowTitle(tr("Choose Drop Action"));
const bool offerFileIo = !defaultTargetDir.isEmpty();
auto * const layout = new QVBoxLayout(this);
const QString idename(Core::Constants::IDE_DISPLAY_NAME);
layout->addWidget(new QLabel(tr("You just dragged some files from one project node to "
"another.\nWhat should Qt Creator do now?"), this));
"another.\nWhat should %1 do now?").arg(idename), this));
auto * const copyButton = new QRadioButton(this);
m_buttonGroup->addButton(copyButton, int(DropAction::Copy));
layout->addWidget(copyButton);

View File

@@ -31,6 +31,7 @@
#include "toolchainconfigwidget.h"
#include "toolchainmanager.h"
#include <app/app_version.h>
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
@@ -123,10 +124,10 @@ public:
const auto layout = new QVBoxLayout(this);
m_detectX64AsX32CheckBox.setText(ToolChainOptionsPage::tr("Detect x86_64 GCC compilers "
"as x86_64 and x86"));
m_detectX64AsX32CheckBox.setToolTip(ToolChainOptionsPage::tr("If checked, Qt Creator will "
"set up two instances of each x86_64 compiler:\nOne for the native x86_64 target, "
"and one for a plain x86 target.\nEnable this if you plan to create 32-bit x86 "
"binaries without using a dedicated cross compiler."));
m_detectX64AsX32CheckBox.setToolTip(ToolChainOptionsPage::tr("If checked, %1 will "
"set up two instances of each x86_64 compiler:\nOne for the native x86_64 target, and "
"one for a plain x86 target.\nEnable this if you plan to create 32-bit x86 binaries "
"without using a dedicated cross compiler.").arg(Core::Constants::IDE_DISPLAY_NAME));
m_detectX64AsX32CheckBox.setChecked(settings.detectX64AsX32);
layout->addWidget(&m_detectX64AsX32CheckBox);
const auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);

View File

@@ -29,6 +29,7 @@
#include "qbsprojectmanagerconstants.h"
#include "qbssettings.h"
#include <app/app_version.h>
#include <coreplugin/messagemanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/taskhub.h>
@@ -269,7 +270,8 @@ QString QbsSession::errorString(QbsSession::Error error)
case Error::ProtocolError:
return tr("The qbs process sent invalid data.");
case Error::VersionMismatch:
return tr("The qbs API level is not compatible with what Qt Creator expects.");
return tr("The qbs API level is not compatible with "
"what %1 expects.").arg(Core::Constants::IDE_DISPLAY_NAME);
}
return QString(); // For dumb compilers.
}