Commit 4ef01c96 authored by Tobias Hunger's avatar Tobias Hunger Committed by Eike Ziller

app_version.h: Make IDE name configurable

Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent ca959d80
......@@ -31,6 +31,10 @@ namespace Constants {
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
const char IDE_DISPLAY_NAME[] = \"Qt Creator\";
const char IDE_ID[] = \"qtcreator\";
const char IDE_CASED_ID[] = \"QtCreator\";
#define IDE_VERSION $${QTCREATOR_VERSION}
#define IDE_VERSION_STR STRINGIFY(IDE_VERSION)
#define IDE_VERSION_DISPLAY_DEF $${QTCREATOR_DISPLAY_VERSION}
......
......@@ -66,7 +66,6 @@ using namespace ExtensionSystem;
enum { OptionIndent = 4, DescriptionIndent = 34 };
const char appNameC[] = "Qt Creator";
const char corePluginNameC[] = "Core";
const char fixedOptionsC[] =
" [OPTION]... [FILE]...\n"
......@@ -110,7 +109,7 @@ static inline QString toHtml(const QString &t)
static void displayHelpText(const QString &t)
{
if (Utils::HostOsInfo::isWindowsHost())
QMessageBox::information(0, QLatin1String(appNameC), toHtml(t));
QMessageBox::information(0, QLatin1String(Core::Constants::IDE_DISPLAY_NAME), toHtml(t));
else
qWarning("%s", qPrintable(t));
}
......@@ -118,7 +117,7 @@ static void displayHelpText(const QString &t)
static void displayError(const QString &t)
{
if (Utils::HostOsInfo::isWindowsHost())
QMessageBox::critical(0, QLatin1String(appNameC), t);
QMessageBox::critical(0, QLatin1String(Core::Constants::IDE_DISPLAY_NAME), t);
else
qCritical("%s", qPrintable(t));
}
......@@ -127,7 +126,7 @@ static void printVersion(const PluginSpec *coreplugin)
{
QString version;
QTextStream str(&version);
str << '\n' << appNameC << ' ' << coreplugin->version()<< " based on Qt " << qVersion() << "\n\n";
str << '\n' << Core::Constants::IDE_DISPLAY_NAME << ' ' << coreplugin->version()<< " based on Qt " << qVersion() << "\n\n";
PluginManager::formatPluginVersions(str);
str << '\n' << coreplugin->copyright() << '\n';
displayHelpText(version);
......@@ -211,7 +210,9 @@ static inline QStringList getPluginPaths()
pluginPath += QLatin1Char('/')
+ QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR)
+ QLatin1Char('/');
pluginPath += QLatin1String(Utils::HostOsInfo::isMacHost() ? "Qt Creator" : "qtcreator");
pluginPath += QLatin1String(Utils::HostOsInfo::isMacHost() ?
Core::Constants::IDE_DISPLAY_NAME :
Core::Constants::IDE_ID);
pluginPath += QLatin1String("/plugins/");
pluginPath += QLatin1String(Core::Constants::IDE_VERSION_LONG);
rc.push_back(pluginPath);
......@@ -228,7 +229,7 @@ static void setupInstallSettings()
QCoreApplication::applicationDirPath() + '/' + RELATIVE_DATA_PATH);
QSettings installSettings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String("QtCreator"));
QLatin1String(Core::Constants::IDE_CASED_ID));
if (installSettings.contains(kInstallSettingsKey)) {
QString installSettingsPath = installSettings.value(kInstallSettingsKey).toString();
if (QDir::isRelativePath(installSettingsPath))
......@@ -241,7 +242,7 @@ static QSettings *createUserSettings()
{
return new QSettings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String("QtCreator"));
QLatin1String(Core::Constants::IDE_CASED_ID));
}
static inline QSettings *userSettings()
......@@ -276,9 +277,9 @@ static inline QSettings *userSettings()
|| lowerFile.startsWith(QLatin1String("qtversion.xml"))
|| lowerFile.startsWith(QLatin1String("devices.xml"))
|| lowerFile.startsWith(QLatin1String("debuggers.xml"))
|| lowerFile.startsWith(QLatin1String("qtcreator.")))
|| lowerFile.startsWith(QLatin1String(Core::Constants::IDE_ID) + "."))
QFile::copy(srcDir.absoluteFilePath(file), destDir.absoluteFilePath(file));
if (file == QLatin1String("qtcreator"))
if (file == QLatin1String(Core::Constants::IDE_ID))
copyRecursively(srcDir.absoluteFilePath(file), destDir.absoluteFilePath(file));
}
......@@ -300,7 +301,7 @@ int main(int argc, char **argv)
if (Utils::HostOsInfo::isLinuxHost())
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/QtCreator-XXXXXX");
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX");
setHighDpiEnvironmentVariable();
......@@ -316,7 +317,7 @@ int main(int argc, char **argv)
#endif
SharedTools::QtSingleApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);
SharedTools::QtSingleApplication app((QLatin1String(Core::Constants::IDE_DISPLAY_NAME)), argc, argv);
loadFonts();
......@@ -335,7 +336,8 @@ int main(int argc, char **argv)
QtSystemExceptionHandler systemExceptionHandler(libexecPath);
#else
// Display a backtrace once a serious signal is delivered (Linux only).
CrashHandlerSetup setupCrashHandler(appNameC, CrashHandlerSetup::EnableRestart, libexecPath);
CrashHandlerSetup setupCrashHandler(Core::Constants::IDE_DISPLAY_NAME,
CrashHandlerSetup::EnableRestart, libexecPath);
#endif
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
......@@ -384,7 +386,7 @@ int main(int argc, char **argv)
QSettings *globalSettings = new QSettings(QSettings::IniFormat, QSettings::SystemScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String("QtCreator"));
QLatin1String(Core::Constants::IDE_CASED_ID));
PluginManager pluginManager;
PluginManager::setPluginIID(QLatin1String("org.qt-project.Qt.QtCreatorPlugin"));
PluginManager::setGlobalSettings(globalSettings);
......@@ -401,7 +403,7 @@ int main(int argc, char **argv)
+ '/' + RELATIVE_DATA_PATH + "/translations";
foreach (QString locale, uiLanguages) {
locale = QLocale(locale).name();
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
if (translator.load(QString::fromLatin1(Core::Constants::IDE_ID) + "_" + locale, creatorTrPath)) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString &qtTrFile = QLatin1String("qt_") + locale;
// Binary installer puts Qt tr files into creatorTrPath
......
......@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Qt Creator - Plugin loader messages</string>
<string>Plugin loader messages</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......
......@@ -252,7 +252,7 @@ protected:
_doc->fileName(),
line, column,
QmlJS::FindExportedCppTypes::tr(
"The type will only be available in Qt Creator's QML editors when the type name is a string literal"));
"The type will only be available in the QML editors when the type name is a string literal"));
return false;
}
......@@ -314,7 +314,7 @@ protected:
QmlJS::FindExportedCppTypes::tr(
"The module URI cannot be determined by static analysis. The type will be available\n"
"globally in the QML editor. You can add a \"// @uri My.Module.Uri\" annotation to let\n"
"Qt Creator know about a likely URI."));
"the QML editor know about a likely URI."));
}
// version arguments must be integer literals
......
......@@ -44,11 +44,11 @@ QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const FileName &fileName,
if (modified) {
msg = QCoreApplication::translate("Utils::reloadPrompt",
"The unsaved file <i>%1</i> has changed outside Qt Creator. "
"The unsaved file <i>%1</i> has been changed on disk. "
"Do you want to reload it and discard your changes?");
} else {
msg = QCoreApplication::translate("Utils::reloadPrompt",
"The file <i>%1</i> has changed outside Qt Creator. Do you want to reload it?");
"The file <i>%1</i> has been changed on disk. Do you want to reload it?");
}
msg = msg.arg(fileName.fileName());
return reloadPrompt(title, msg, fileName.toUserOutput(), enableDiffOption, parent);
......@@ -106,12 +106,12 @@ QTCREATOR_UTILS_EXPORT FileDeletedPromptAnswer
QString msg;
if (triggerExternally) {
msg = QCoreApplication::translate("Utils::fileDeletedPrompt",
"The file %1 has been removed outside Qt Creator. "
"The file %1 has been removed from disk. "
"Do you want to save it under a different name, or close "
"the editor?").arg(QDir::toNativeSeparators(fileName));
} else {
msg = QCoreApplication::translate("Utils::fileDeletedPrompt",
"The file %1 was removed. "
"The file %1 has been removed from disk. "
"Do you want to save it under a different name, or close "
"the editor?").arg(QDir::toNativeSeparators(fileName));
}
......
......@@ -27,6 +27,8 @@
#include "androidconstants.h"
#include "androidconfigurations.h"
#include <app/app_version.h>
#include <utils/detailswidget.h>
#include <utils/utilsicons.h>
......@@ -91,8 +93,9 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
auto layout = new QGridLayout(mainWidget);
layout->setMargin(0);
auto label = new QLabel;
label->setText(tr("Qt Creator needs additional settings to enable Android support."
" You can configure those settings in the Options dialog."));
label->setText(tr("%1 needs additional settings to enable Android support."
" You can configure those settings in the Options dialog.")
.arg(Core::Constants::IDE_DISPLAY_NAME));
label->setWordWrap(true);
layout->addWidget(label, 0, 0, 1, 2);
......
......@@ -81,7 +81,7 @@ BuildPathPage::BuildPathPage(AutotoolsOpenProjectWizard *w) : QWizardPage(w),
QLabel *label = new QLabel(this);
label->setWordWrap(true);
label->setText(tr("Please enter the directory in which you want to build your project. "
"Qt Creator recommends to not use the source directory for building. "
"It is not recommended to use the source directory for building. "
"This ensures that the source directory remains clean and enables multiple builds "
"with different settings."));
fl->addWidget(label);
......
......@@ -194,8 +194,8 @@ bool CMakeBuildStep::init(QList<const BuildStep *> &earlierSteps)
CMakeTool *tool = CMakeKitInformation::cmakeTool(target()->kit());
if (!tool || !tool->isValid()) {
emit addTask(Task(Task::Error,
tr("Qt Creator needs a CMake Tool set up to build. "
"Configure a CMake Tool in the kit options."),
tr("A CMake tool must be set up for building. "
"Configure a CMake tool in the kit options."),
Utils::FileName(), -1,
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
canInit = false;
......
......@@ -29,6 +29,7 @@
#include "cmaketoolmanager.h"
#include "cmaketool.h"
#include <app/app_version.h>
#include <projectexplorer/task.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/kit.h>
......@@ -383,7 +384,8 @@ QList<Task> CMakeGeneratorKitInformation::validate(const Kit *k) const
if (!tool->hasServerMode() && info.extraGenerator != "CodeBlocks") {
result << Task(Task::Warning, tr("The selected CMake binary has no server-mode and the CMake "
"generator does not generate a CodeBlocks file. "
"Qt Creator will not be able to parse CMake projects."),
"%1 will not be able to parse CMake projects.")
.arg(Core::Constants::IDE_DISPLAY_NAME),
Utils::FileName(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
}
......
......@@ -157,7 +157,7 @@ void ServerModeReader::resetData()
void ServerModeReader::parse(bool force)
{
emit configurationStarted();
Core::MessageManager::write(tr("Starting to parse CMake project for Qt Creator."));
Core::MessageManager::write(tr("Starting to parse CMake project."));
QTC_ASSERT(m_cmakeServer, return);
QVariantMap extra;
......
......@@ -26,11 +26,10 @@
#include "commandsfile.h"
#include "command_p.h"
#include <coreplugin/dialogs/shortcutsettings.h>
#include <coreplugin/icore.h>
#include <app/app_version.h>
#include <utils/qtcassert.h>
#include <utils/fileutils.h>
#include <QKeySequence>
......@@ -137,8 +136,8 @@ bool CommandsFile::exportCommands(const QList<ShortcutItem *> &items)
w.setAutoFormattingIndent(1); // Historical, used to be QDom.
w.writeStartDocument();
w.writeDTD(QLatin1String("<!DOCTYPE KeyboardMappingScheme>"));
w.writeComment(QString::fromLatin1(" Written by Qt Creator %1, %2. ").
arg(QLatin1String(Constants::IDE_VERSION_LONG),
w.writeComment(QString::fromLatin1(" Written by %1, %2. ").
arg(ICore::versionString(),
QDateTime::currentDateTime().toString(Qt::ISODate)));
w.writeStartElement(ctx.mappingElement);
foreach (const ShortcutItem *item, items) {
......
......@@ -44,6 +44,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/fileutils.h>
#include <app/app_version.h>
#include <extensionsystem/pluginerroroverview.h>
#include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h>
......@@ -186,15 +187,22 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
[]() { return DocumentManager::projectsDirectory(); });
expander->registerVariable("Config:LastFileDialogDirectory", tr("The directory last visited in a file dialog."),
[]() { return DocumentManager::fileDialogLastVisitedDirectory(); });
expander->registerVariable("HostOs:isWindows", tr("Is Qt Creator running on Windows?"),
expander->registerVariable("HostOs:isWindows",
tr("Is %1 running on Windows?").arg(Constants::IDE_DISPLAY_NAME),
[]() { return QVariant(Utils::HostOsInfo::isWindowsHost()).toString(); });
expander->registerVariable("HostOs:isOSX", tr("Is Qt Creator running on OS X?"),
expander->registerVariable("HostOs:isOSX",
tr("Is %1 running on OS X?").arg(Constants::IDE_DISPLAY_NAME),
[]() { return QVariant(Utils::HostOsInfo::isMacHost()).toString(); });
expander->registerVariable("HostOs:isLinux", tr("Is Qt Creator running on Linux?"),
expander->registerVariable("HostOs:isLinux",
tr("Is %1 running on Linux?").arg(Constants::IDE_DISPLAY_NAME),
[]() { return QVariant(Utils::HostOsInfo::isLinuxHost()).toString(); });
expander->registerVariable("HostOs:isUnix", tr("Is Qt Creator running on any unix-based platform?"),
expander->registerVariable("HostOs:isUnix",
tr("Is %1 running on any unix-based platform?")
.arg(Constants::IDE_DISPLAY_NAME),
[]() { return QVariant(Utils::HostOsInfo::isAnyUnixHost()).toString(); });
expander->registerVariable("IDE:ResourcePath", tr("The directory where Qt Creator finds its pre-installed resources."),
expander->registerVariable("IDE:ResourcePath",
tr("The directory where %1 finds its pre-installed resources.")
.arg(Constants::IDE_DISPLAY_NAME),
[]() { return ICore::resourcePath(); });
expander->registerPrefix("CurrentDate:", tr("The current date (QDate formatstring)."),
[](const QString &fmt) { return QDate::currentDate().toString(fmt); });
......
......@@ -34,6 +34,8 @@
#include "documentmodel_p.h"
#include "ieditor.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
......@@ -1789,7 +1791,7 @@ void EditorManagerPrivate::updateWindowTitleForDocument(IDocument *document, QWi
if (!windowTitle.isEmpty())
windowTitle.append(dashSep);
windowTitle.append(tr("Qt Creator"));
windowTitle.append(Core::Constants::IDE_DISPLAY_NAME);
window->window()->setWindowTitle(windowTitle);
window->window()->setWindowFilePath(filePath);
......
......@@ -26,6 +26,7 @@
#include "externaltool.h"
#include "externaltoolmanager.h"
#include "icore.h"
#include "idocument.h"
#include "messagemanager.h"
#include "documentmanager.h"
......@@ -480,8 +481,8 @@ bool ExternalTool::save(QString *errorMessage) const
QXmlStreamWriter out(saver.file());
out.setAutoFormatting(true);
out.writeStartDocument(QLatin1String("1.0"));
out.writeComment(QString::fromLatin1("Written on %1 by Qt Creator %2")
.arg(QDateTime::currentDateTime().toString(), QLatin1String(Constants::IDE_VERSION_LONG)));
out.writeComment(QString::fromLatin1("Written on %1 by %2")
.arg(QDateTime::currentDateTime().toString(), ICore::versionString()));
out.writeStartElement(QLatin1String(kExternalTool));
out.writeAttribute(QLatin1String(kId), m_id);
out.writeTextElement(QLatin1String(kDescription), m_description);
......
......@@ -164,7 +164,7 @@ void GeneralSettings::setLanguage(const QString &locale)
QSettings *settings = ICore::settings();
if (settings->value(QLatin1String("General/OverrideLanguage")).toString() != locale)
QMessageBox::information(ICore::mainWindow(), tr("Restart Required"),
tr("The language change will take effect after a restart of Qt Creator."));
tr("The language change will take effect after restart."));
if (locale.isEmpty())
settings->remove(QLatin1String("General/OverrideLanguage"));
......
......@@ -461,8 +461,9 @@ QString ICore::versionString()
QString ideVersionDescription;
if (QLatin1String(Constants::IDE_VERSION_LONG) != QLatin1String(Constants::IDE_VERSION_DISPLAY))
ideVersionDescription = tr(" (%1)").arg(QLatin1String(Constants::IDE_VERSION_LONG));
return tr("Qt Creator %1%2").arg(QLatin1String(Constants::IDE_VERSION_DISPLAY),
ideVersionDescription);
return tr("%1 %2%3").arg(QLatin1String(Constants::IDE_DISPLAY_NAME),
QLatin1String(Constants::IDE_VERSION_DISPLAY),
ideVersionDescription);
}
QString ICore::buildCompatibilityString()
......
......@@ -109,7 +109,7 @@ MainWindow::MainWindow() :
m_coreImpl(new ICore(this)),
m_lowPrioAdditionalContexts(Constants::C_GLOBAL),
m_settingsDatabase(new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(),
QLatin1String("QtCreator"),
QLatin1String(Constants::IDE_CASED_ID),
this)),
m_progressManager(new ProgressManagerPrivate),
m_jsExpander(new JsExpander),
......@@ -130,10 +130,10 @@ MainWindow::MainWindow() :
HistoryCompleter::setSettings(PluginManager::settings());
setWindowTitle(tr("Qt Creator"));
setWindowTitle(Constants::IDE_DISPLAY_NAME);
if (HostOsInfo::isLinuxHost())
QApplication::setWindowIcon(Icons::QTCREATORLOGO_BIG.icon());
QCoreApplication::setApplicationName(QLatin1String("QtCreator"));
QCoreApplication::setApplicationName(QLatin1String(Constants::IDE_CASED_ID));
QCoreApplication::setApplicationVersion(QLatin1String(Constants::IDE_VERSION_LONG));
QCoreApplication::setOrganizationName(QLatin1String(Constants::IDE_SETTINGSVARIANT_STR));
QString baseName = QApplication::style()->objectName();
......@@ -741,9 +741,9 @@ void MainWindow::registerDefaultActions()
// About IDE Action
icon = QIcon::fromTheme(QLatin1String("help-about"));
if (HostOsInfo::isMacHost())
tmpaction = new QAction(icon, tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu
tmpaction = new QAction(icon, tr("About &%1").arg(Constants::IDE_DISPLAY_NAME), this); // it's convention not to add dots to the about menu
else
tmpaction = new QAction(icon, tr("About &Qt Creator..."), this);
tmpaction = new QAction(icon, tr("About &%1...").arg(Constants::IDE_DISPLAY_NAME), this);
tmpaction->setMenuRole(QAction::AboutRole);
cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_QTCREATOR);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
......
......@@ -136,7 +136,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>&lt;i&gt;Note: Wide range values might impact Qt Creator's performance when opening files.&lt;/i&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Note: Wide range values might impact performance when opening files.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
......
......@@ -31,6 +31,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/iexternaleditor.h>
#include <utils/algorithm.h>
#include <utils/headerviewstretcher.h>
#include <utils/mimetypes/mimedatabase.h>
......@@ -400,7 +401,7 @@ void MimeTypeSettingsPrivate::resetMimeTypes()
m_userModifiedMimeTypes.clear(); // settings file will be removed with next settings-save
QMessageBox::information(ICore::dialogParent(),
tr("Reset MIME Types"),
tr("Changes will take effect after Qt Creator restart."));
tr("Changes will take effect after restart."));
}
void MimeTypeSettingsPrivate::setFilterPattern(const QString &pattern)
......
......@@ -31,6 +31,7 @@
#include "patchtool.h"
#include "vcsmanager.h"
#include <app/app_version.h>
#include <utils/checkablemessagebox.h>
#include <utils/consoleprocess.h>
#include <utils/environment.h>
......@@ -97,6 +98,11 @@ QWidget *SystemSettings::widget()
m_page->patchChooser->setHistoryCompleter(QLatin1String("General.PatchCommand.History"));
m_page->patchChooser->setPath(PatchTool::patchCommand());
m_page->autoSaveCheckBox->setChecked(EditorManagerPrivate::autoSaveEnabled());
m_page->autoSaveCheckBox->setToolTip(tr("Automatically creates temporary copies of "
"modified files. If %1 is restarted after "
"a crash or power failure, it asks whether to "
"recover the auto-saved content.")
.arg(Constants::IDE_DISPLAY_NAME));
m_page->autoSaveInterval->setValue(EditorManagerPrivate::autoSaveInterval());
m_page->autoSuspendCheckBox->setChecked(EditorManagerPrivate::autoSuspendEnabled());
m_page->autoSuspendMinDocumentCount->setValue(EditorManagerPrivate::autoSuspendMinDocumentCount());
......
......@@ -86,9 +86,6 @@
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="autoSaveCheckBox">
<property name="toolTip">
<string>Automatically creates temporary copies of modified files. If Qt Creator is restarted after a crash or power failure, it asks whether to recover the auto-saved content.</string>
</property>
<property name="text">
<string>Auto-save modified files</string>
</property>
......@@ -309,7 +306,7 @@
<item>
<widget class="QLabel" name="autoSuspendLabel">
<property name="toolTip">
<string>Minimum number of open documents that should be kept in memory. Increasing this number will lead to greater resource usage of Qt Creator when not manually closing documents.</string>
<string>Minimum number of open documents that should be kept in memory. Increasing this number will lead to greater resource usage when not manually closing documents.</string>
</property>
<property name="text">
<string>Files to keep open:</string>
......
......@@ -179,7 +179,7 @@ void ThemeChooser::apply()
const QString currentThemeId = ThemeEntry::themeSetting().toString();
if (currentThemeId != themeId) {
QMessageBox::information(ICore::mainWindow(), tr("Restart Required"),
tr("The theme change will take effect after a restart of Qt Creator."));
tr("The theme change will take effect after restart."));
// save filename of selected theme in global config
settings->setValue(QLatin1String(Constants::SETTINGS_THEME), themeId);
......
......@@ -51,7 +51,7 @@ VersionDialog::VersionDialog(QWidget *parent)
if (Utils::HostOsInfo::isLinuxHost())
setWindowIcon(Icons::QTCREATORLOGO_BIG.icon());
setWindowTitle(tr("About Qt Creator"));
setWindowTitle(tr("About %1").arg(Core::Constants::IDE_DISPLAY_NAME));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
QGridLayout *layout = new QGridLayout(this);
layout->setSizeConstraint(QLayout::SetFixedSize);
......
......@@ -31,6 +31,7 @@
#include "coreconstants.h"
#include "icore.h"
#include <app/app_version.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
......@@ -191,7 +192,7 @@ void WindowList::updateTitle(QWidget *window)
QTC_ASSERT(index >= 0, return);
QTC_ASSERT(index < m_windowActions.size(), return);
QString title = window->windowTitle();
if (title.endsWith(QStringLiteral("- Qt Creator")))
if (title.endsWith(QStringLiteral("- ") + Constants::IDE_DISPLAY_NAME))
title.chop(12);
m_windowActions.at(index)->setText(title.trimmed());
}
......
......@@ -27,6 +27,8 @@
#include "cppmodelmanagersupportinternal.h"
#include "builtineditordocumentprocessor.h"
#include <app/app_version.h>
#include <QCoreApplication>
using namespace CppTools;
......@@ -40,7 +42,7 @@ QString ModelManagerSupportProviderInternal::id() const
QString ModelManagerSupportProviderInternal::displayName() const
{
return QCoreApplication::translate("ModelManagerSupportInternal::displayName",
"Qt Creator Built-in");
"%1 Built-in").arg(Core::Constants::IDE_DISPLAY_NAME);
}
ModelManagerSupport::Ptr ModelManagerSupportProviderInternal::createModelManagerSupport()
......
......@@ -44,7 +44,7 @@
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="consoleCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Uses CDB's native console instead of Qt Creator's console for console applications. The native console does not prompt on application exit. It is suitable for diagnosing cases in which the application does not start up properly in Qt Creator's console and the subsequent attach fails.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Uses CDB's native console for console applications. This overrides the setting in Environment &gt; System. The native console does not prompt on application exit. It is suitable for diagnosing cases in which the application does not start up properly in the configured console and the subsequent attach fails.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use CDB &amp;console</string>
......
......@@ -32,6 +32,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/variablechooser.h>
#include <app/app_version.h>
#include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
......@@ -129,7 +130,9 @@ QWidget *CommonOptionsPage::widget()
checkBoxSwitchModeOnExit->setText(tr("Switch to previous mode on debugger exit"));
auto checkBoxBringToForegroundOnInterrrupt = new QCheckBox(behaviorBox);
checkBoxBringToForegroundOnInterrrupt->setText(tr("Bring Qt Creator to foreground when application interrupts"));
checkBoxBringToForegroundOnInterrrupt->setText(
tr("Bring %1 to foreground when application interrupts")
.arg(Core::Constants::IDE_DISPLAY_NAME));
auto checkBoxShowQmlObjectTree = new QCheckBox(behaviorBox);
checkBoxShowQmlObjectTree->setToolTip(tr("Shows QML object tree in Locals and Expressions when connected and not stepping."));
......@@ -140,8 +143,12 @@ QWidget *CommonOptionsPage::widget()
checkBoxBreakpointsFullPath->setText(tr("Set breakpoints using a full absolute path"));
auto checkBoxRegisterForPostMortem = new QCheckBox(behaviorBox);
checkBoxRegisterForPostMortem->setToolTip(tr("Registers Qt Creator for debugging crashed applications."));
checkBoxRegisterForPostMortem->setText(tr("Use Qt Creator for post-mortem debugging"));
checkBoxRegisterForPostMortem->setToolTip(
tr("Registers %1 for debugging crashed applications.")
.arg(Core::Constants::IDE_DISPLAY_NAME));
checkBoxRegisterForPostMortem->setText(
tr("Use %1 for post-mortem debugging")
.arg(Core::Constants::IDE_DISPLAY_NAME));
auto checkBoxWarnOnReleaseBuilds = new QCheckBox(behaviorBox);
checkBoxWarnOnReleaseBuilds->setText(tr("Warn when debugging \"Release\" builds"));
......@@ -314,7 +321,7 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox);
groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization"));
groupBoxCustomDumperCommands->setToolTip(tr(
"<html><head/><body><p>Python commands entered here will be executed after Qt Creator's "
"<html><head/><body><p>Python commands entered here will be executed after built-in "
"debugging helpers have been loaded and fully initialized. You can load additional "
"debugging helpers or modify existing ones here.</p></body></html>"));
......
......@@ -34,6 +34,8 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runnables.h>
#include <projectexplorer/toolchain.h>
#include <app/app_version.h>
#include <utils/pathchooser.h>
#include <utils/fancylineedit.h>
#include <utils/qtcassert.h>
......@@ -264,7 +266,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->serverStartScriptPathChooser->setPromptDialogTitle(tr("Select Server Start Script"));
d->serverStartScriptPathChooser->setToolTip(tr(
"This option can be used to point to a script that will be used "
"to start a debug server. If the field is empty, Qt Creator's "
"to start a debug server. If the field is empty, "
"default methods to set up debug servers will be used."));
d->serverStartScriptLabel = new QLabel(tr("&Server start script:"), this);
d->serverStartScriptLabel->setBuddy(d->serverStartScriptPathChooser);
......@@ -558,15 +560,16 @@ static QString cdbRemoteHelp()
const QString ext32 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(false));
const QString ext64 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(true));
return StartRemoteCdbDialog::tr(
"<html><body><p>The remote CDB needs to load the matching Qt Creator CDB extension "
"(<code>%1</code> or <code>%2</code>, respectively).</p><p>Copy it onto the remote machine and set the "
"environment variable <code>%3</code> to point to its folder.</p><p>"
"Launch the remote CDB as <code>%4 &lt;executable&gt;</code> "
"<html><body><p>The remote CDB needs to load the matching %1 CDB extension "
"(<code>%2</code> or <code>%3</code>, respectively).</p><p>Copy it onto the remote machine and set the "
"environment variable <code>%4</code> to point to its folder.</p><p>"
"Launch the remote CDB as <code>%5 &lt;executable&gt;</code> "
"to use TCP/IP as communication protocol.</p><p>Enter the connection parameters as:</p>"
"<pre>%5</pre></body></html>").
arg(ext32, ext64, QLatin1String("_NT_DEBUGGER_EXTENSION_PATH"),
QLatin1String("cdb.exe -server tcp:port=1234"),
QLatin1String(cdbConnectionSyntax));
"<pre>%6</pre></body></html>")
.arg(Core::Constants::IDE_DISPLAY_NAME,
ext32, ext64, QLatin1String("_NT_DEBUGGER_EXTENSION_PATH"),
QLatin1String("cdb.exe -server tcp:port=1234"),
QLatin1String(cdbConnectionSyntax));
}
StartRemoteCdbDialog::StartRemoteCdbDialog(QWidget *parent) :
......
......@@ -67,6 +67,8 @@
#include "analyzer/analyzerconstants.h"
#include "analyzer/analyzermanager.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
......@@ -2089,9 +2091,11 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
const Abi tcAbi = ToolChainKitInformation::targetAbi(kit);
const bool isWindows = (tcAbi.os() == Abi::WindowsOS);
if (isWindows && isWinProcessBeingDebugged(process.pid)) {
AsynchronousMessageBox::warning(tr("Process Already Under Debugger Control"),
tr("The process %1 is already under the control of a debugger.\n"
"Qt Creator cannot attach to it.").arg(process.pid));
AsynchronousMessageBox::warning(
tr("Process Already Under Debugger Control"),
tr("The process %1 is already under the control of a debugger.\n"
"%2 cannot attach to it.").arg(process.pid)
.arg(Core::Constants::IDE_DISPLAY_NAME));
return 0;
}
......
......@@ -215,7 +215,7 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
"at which the modules where built, for example, while "
"doing remote debugging.</p>"
"<p>If source is specified as a regular expression by starting it with an "
"open parenthesis, Qt Creator matches the paths in the ELF with the "
"open parenthesis, the paths in the ELF are matched with the "
"regular expression to automatically determine the source path.</p>"
"<p>Example: <b>(/home/.*/Project)/KnownSubDir -> D:\\Project</b> will "
"substitute ELF built by any user to your local project directory.</p>"));
......