Reduce usage of app_version header

Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.

This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.

Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2023-06-21 15:12:46 +02:00
parent 27302694ab
commit dff9e1463b
96 changed files with 375 additions and 384 deletions

View File

@@ -4,12 +4,6 @@ if(NOT IS_ABSOLUTE "${IDE_ICON_PATH}")
set(IDE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_ICON_PATH}") set(IDE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_ICON_PATH}")
endif() endif()
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/app_version.h
DESTINATION ${IDE_HEADER_INSTALL_PATH}/src/app
COMPONENT Devel EXCLUDE_FROM_ALL
)
add_qtc_executable(qtcreator add_qtc_executable(qtcreator
DEFINES IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\" DEFINES IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\"
DEPENDS Aggregation ExtensionSystem Qt::Core Qt::Widgets Utils shared_qtsingleapplication app_version DEPENDS Aggregation ExtensionSystem Qt::Core Qt::Widgets Utils shared_qtsingleapplication app_version

View File

@@ -11,6 +11,7 @@
#include <qtsingleapplication.h> #include <qtsingleapplication.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/appinfo.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/fsengine/fsengine.h> #include <utils/fsengine/fsengine.h>
@@ -653,6 +654,16 @@ int main(int argc, char **argv)
PluginManager::setGlobalSettings(globalSettings); PluginManager::setGlobalSettings(globalSettings);
PluginManager::setSettings(settings); PluginManager::setSettings(settings);
using namespace Core;
Utils::AppInfo info;
info.author = Constants::IDE_AUTHOR;
info.year = Constants::IDE_YEAR;
info.displayVersion = Constants::IDE_VERSION_DISPLAY;
info.id = Constants::IDE_ID;
info.revision = Constants::IDE_REVISION_STR;
info.revisionUrl = Constants::IDE_REVISION_URL;
Utils::Internal::setAppInfo(info);
QTranslator translator; QTranslator translator;
QTranslator qtTranslator; QTranslator qtTranslator;
QStringList uiLanguages = QLocale::system().uiLanguages(); QStringList uiLanguages = QLocale::system().uiLanguages();

View File

@@ -4,7 +4,6 @@
#include "mainwidget.h" #include "mainwidget.h"
#include "ui_mainwidget.h" #include "ui_mainwidget.h"
#include <app/app_version.h>
#include <QApplication> #include <QApplication>
#include <QDateTime> #include <QDateTime>
@@ -23,7 +22,8 @@ MainWidget::MainWidget(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
ui->mainWidgetTopLabel.setText(tr("%1 has crashed").arg(Core::Constants::IDE_DISPLAY_NAME)); const QString applicationName = QApplication::arguments().at(3);
ui->mainWidgetTopLabel.setText(tr("%1 has crashed").arg(applicationName));
connect(ui->restartButton, &QAbstractButton::clicked, this, &MainWidget::restartApplication); connect(ui->restartButton, &QAbstractButton::clicked, this, &MainWidget::restartApplication);
connect(ui->quitButton, &QAbstractButton::clicked, this, &MainWidget::quitApplication); connect(ui->quitButton, &QAbstractButton::clicked, this, &MainWidget::quitApplication);

View File

@@ -9,6 +9,7 @@ add_qtc_library(Utils
QtConcurrentTools QtConcurrentTools
algorithm.h algorithm.h
ansiescapecodehandler.cpp ansiescapecodehandler.h ansiescapecodehandler.cpp ansiescapecodehandler.h
appinfo.cpp appinfo.h
appmainwindow.cpp appmainwindow.h appmainwindow.cpp appmainwindow.h
archive.cpp archive.h archive.cpp archive.h
aspects.cpp aspects.h aspects.cpp aspects.h

View File

@@ -0,0 +1,20 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "appinfo.h"
Q_GLOBAL_STATIC(Utils::AppInfo, sAppInfo)
namespace Utils {
Utils::AppInfo appInfo()
{
return *sAppInfo;
}
void Internal::setAppInfo(const AppInfo &info)
{
*sAppInfo = info;
}
} // namespace Utils

29
src/libs/utils/appinfo.h Normal file
View File

@@ -0,0 +1,29 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "utils_global.h"
#include <QString>
namespace Utils {
class QTCREATOR_UTILS_EXPORT AppInfo
{
public:
QString author;
QString year;
QString displayVersion;
QString id;
QString revision;
QString revisionUrl;
};
QTCREATOR_UTILS_EXPORT AppInfo appInfo();
namespace Internal {
QTCREATOR_UTILS_EXPORT void setAppInfo(const AppInfo &info);
} // namespace Internal
} // namespace Utils

View File

@@ -36,7 +36,6 @@ Project {
Depends { name: "Qt"; submodules: ["concurrent", "core-private", "network", "qml", "widgets", "xml"] } Depends { name: "Qt"; submodules: ["concurrent", "core-private", "network", "qml", "widgets", "xml"] }
Depends { name: "Qt.macextras"; condition: Qt.core.versionMajor < 6 && qbs.targetOS.contains("macos") } Depends { name: "Qt.macextras"; condition: Qt.core.versionMajor < 6 && qbs.targetOS.contains("macos") }
Depends { name: "Tasking" } Depends { name: "Tasking" }
Depends { name: "app_version_header" }
Depends { name: "ptyqt" } Depends { name: "ptyqt" }
files: [ files: [
@@ -44,6 +43,8 @@ Project {
"algorithm.h", "algorithm.h",
"ansiescapecodehandler.cpp", "ansiescapecodehandler.cpp",
"ansiescapecodehandler.h", "ansiescapecodehandler.h",
"appinfo.cpp",
"appinfo.h",
"appmainwindow.cpp", "appmainwindow.cpp",
"appmainwindow.h", "appmainwindow.h",
"archive.cpp", "archive.cpp",

View File

@@ -15,7 +15,6 @@ Project {
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "app_version_header" }
files: [ files: [
"android_global.h", "androidtr.h", "android_global.h", "androidtr.h",

View File

@@ -6,8 +6,6 @@
#include "androidpotentialkit.h" #include "androidpotentialkit.h"
#include "androidtr.h" #include "androidtr.h"
#include <app/app_version.h>
#include <coreplugin/coreicons.h> #include <coreplugin/coreicons.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -22,10 +20,10 @@
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QGridLayout> #include <QGridLayout>
#include <QGuiApplication>
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
namespace Android::Internal { namespace Android::Internal {
class AndroidPotentialKitWidget : public Utils::DetailsWidget class AndroidPotentialKitWidget : public Utils::DetailsWidget
@@ -83,7 +81,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
auto label = new QLabel; auto label = new QLabel;
label->setText(Tr::tr("%1 needs additional settings to enable Android support." label->setText(Tr::tr("%1 needs additional settings to enable Android support."
" You can configure those settings in the Options dialog.") " You can configure those settings in the Options dialog.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
label->setWordWrap(true); label->setWordWrap(true);
layout->addWidget(label, 0, 0, 1, 2); layout->addWidget(label, 0, 0, 1, 2);

View File

@@ -7,8 +7,6 @@
#include "androidtoolchain.h" #include "androidtoolchain.h"
#include "androidtr.h" #include "androidtr.h"
#include <app/app_version.h>
#include <projectexplorer/buildsystem.h> #include <projectexplorer/buildsystem.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>

View File

@@ -7,8 +7,6 @@
#include "androidsdkmodel.h" #include "androidsdkmodel.h"
#include "androidtr.h" #include "androidtr.h"
#include <app/app_version.h>
#include <utils/async.h> #include <utils/async.h>
#include <utils/layoutbuilder.h> #include <utils/layoutbuilder.h>
#include <utils/outputformatter.h> #include <utils/outputformatter.h>
@@ -18,6 +16,7 @@
#include <QAbstractButton> #include <QAbstractButton>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QGridLayout> #include <QGridLayout>
#include <QGuiApplication>
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QLoggingCategory> #include <QLoggingCategory>
@@ -282,8 +281,8 @@ void AndroidSdkManagerWidget::installEssentials()
Tr::tr("Android SDK Changes"), Tr::tr("Android SDK Changes"),
Tr::tr("%1 cannot find the following essential packages: \"%2\".\n" Tr::tr("%1 cannot find the following essential packages: \"%2\".\n"
"Install them manually after the current operation is done.\n") "Install them manually after the current operation is done.\n")
.arg(Core::Constants::IDE_DISPLAY_NAME) .arg(QGuiApplication::applicationDisplayName(),
.arg(m_sdkModel->missingEssentials().join("\", \""))); m_sdkModel->missingEssentials().join("\", \"")));
} }
onApplyButton(Tr::tr("Android SDK installation is missing necessary packages. " onApplyButton(Tr::tr("Android SDK installation is missing necessary packages. "
"Do you want to install the missing packages?")); "Do you want to install the missing packages?"));

View File

@@ -40,8 +40,6 @@
#include <qtsupport/qtcppkitinfo.h> #include <qtsupport/qtcppkitinfo.h>
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/checkablemessagebox.h> #include <utils/checkablemessagebox.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>

View File

@@ -10,8 +10,6 @@
#include "cmaketool.h" #include "cmaketool.h"
#include "cmaketoolmanager.h" #include "cmaketoolmanager.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <ios/iosconstants.h> #include <ios/iosconstants.h>
@@ -41,6 +39,7 @@
#include <QDialog> #include <QDialog>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QGridLayout> #include <QGridLayout>
#include <QGuiApplication>
#include <QLineEdit> #include <QLineEdit>
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include <QPointer> #include <QPointer>
@@ -740,7 +739,7 @@ Tasks CMakeGeneratorKitAspect::validate(const Kit *k) const
if (!tool->hasFileApi()) { if (!tool->hasFileApi()) {
addWarning(Tr::tr("The selected CMake binary does not support file-api. " addWarning(Tr::tr("The selected CMake binary does not support file-api. "
"%1 will not be able to parse CMake projects.") "%1 will not be able to parse CMake projects.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
} }
} }

View File

@@ -12,7 +12,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "app_version_header" }
files: [ files: [
"builddirparameters.cpp", "builddirparameters.cpp",

View File

@@ -9,12 +9,11 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <QDebug> #include <QDebug>
#include <QGuiApplication>
using namespace Utils; using namespace Utils;
@@ -132,7 +131,7 @@ mergeTools(std::vector<std::unique_ptr<CMakeTool>> &sdkTools,
CMakeToolSettingsAccessor::CMakeToolSettingsAccessor() CMakeToolSettingsAccessor::CMakeToolSettingsAccessor()
{ {
setDocType("QtCreatorCMakeTools"); setDocType("QtCreatorCMakeTools");
setApplicationDisplayName(Core::Constants::IDE_DISPLAY_NAME); setApplicationDisplayName(QGuiApplication::applicationDisplayName());
setBaseFilePath(Core::ICore::userResourcePath(CMAKE_TOOL_FILENAME)); setBaseFilePath(Core::ICore::userResourcePath(CMAKE_TOOL_FILENAME));
addVersionUpgrader(std::make_unique<CMakeToolSettingsUpgraderV0>()); addVersionUpgrader(std::make_unique<CMakeToolSettingsUpgraderV0>());

View File

@@ -5,13 +5,13 @@
#include "cmakeprojectmanagertr.h" #include "cmakeprojectmanagertr.h"
#include <app/app_version.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <projectexplorer/rawprojectpart.h> #include <projectexplorer/rawprojectpart.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QGuiApplication>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>
@@ -42,10 +42,9 @@ static FilePath cmakeReplyDirectory(const FilePath &buildDirectory)
static void reportFileApiSetupFailure() static void reportFileApiSetupFailure()
{ {
Core::MessageManager::writeFlashing( Core::MessageManager::writeFlashing(Tr::tr("Failed to set up CMake file API support. %1 cannot "
Tr::tr("Failed to set up CMake file API support. %1 cannot "
"extract project information.") "extract project information.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
} }
static std::pair<int, int> cmakeVersion(const QJsonObject &obj) static std::pair<int, int> cmakeVersion(const QJsonObject &obj)

View File

@@ -1,5 +1,4 @@
add_qtc_plugin(Coco add_qtc_plugin(Coco
PUBLIC_DEPENDS app_version
PLUGIN_DEPENDS Core LanguageClient PLUGIN_DEPENDS Core LanguageClient
SOURCES SOURCES
cocolanguageclient.cpp cocolanguageclient.h cocolanguageclient.cpp cocolanguageclient.h

View File

@@ -7,8 +7,6 @@ QtcPlugin {
Depends { name: "LanguageClient" } Depends { name: "LanguageClient" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
Depends { name: "Qt"; submodules: ["widgets"] } Depends { name: "Qt"; submodules: ["widgets"] }
files: [ files: [

View File

@@ -3,7 +3,6 @@
#include "cocolanguageclient.h" #include "cocolanguageclient.h"
#include <app/app_version.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <languageclient/diagnosticmanager.h> #include <languageclient/diagnosticmanager.h>
#include <languageclient/languageclienthoverhandler.h> #include <languageclient/languageclienthoverhandler.h>
@@ -17,6 +16,7 @@
#include <texteditor/textmark.h> #include <texteditor/textmark.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QGuiApplication>
#include <QTextEdit> #include <QTextEdit>
using namespace LanguageClient; using namespace LanguageClient;
@@ -52,7 +52,7 @@ CocoLanguageClient::CocoLanguageClient(const FilePath &coco, const FilePath &csm
ClientInfo info; ClientInfo info;
info.setName("CocoQtCreator"); info.setName("CocoQtCreator");
info.setVersion(Core::Constants::IDE_VERSION_DISPLAY); info.setVersion(QGuiApplication::applicationDisplayName());
setClientInfo(info); setClientInfo(info);
initClientCapabilities(); initClientCapabilities();

View File

@@ -5,7 +5,7 @@ configure_file(core_logo.qrc.cmakein core_logo_cmake.qrc)
add_qtc_plugin(Core add_qtc_plugin(Core
DEPENDS Qt::PrintSupport Qt::Qml Qt::Sql Qt::Gui Qt::GuiPrivate DEPENDS Qt::PrintSupport Qt::Qml Qt::Sql Qt::Gui Qt::GuiPrivate
PUBLIC_DEPENDS Aggregation ExtensionSystem Utils app_version PUBLIC_DEPENDS Aggregation ExtensionSystem Utils
SOURCES SOURCES
${CMAKE_CURRENT_BINARY_DIR}/core_logo_cmake.qrc ${CMAKE_CURRENT_BINARY_DIR}/core_logo_cmake.qrc
actionmanager/actioncontainer.cpp actionmanager/actioncontainer.cpp

View File

@@ -6,7 +6,6 @@
#include <coreplugin/dialogs/shortcutsettings.h> #include <coreplugin/dialogs/shortcutsettings.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <app/app_version.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>

View File

@@ -3,8 +3,7 @@
#include "corejsextensions.h" #include "corejsextensions.h"
#include <app/app_version.h> #include <utils/appinfo.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/mimeutils.h> #include <utils/mimeutils.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -27,7 +26,7 @@ QString UtilsJsExtension::qtVersion() const
QString UtilsJsExtension::qtCreatorVersion() const QString UtilsJsExtension::qtCreatorVersion() const
{ {
return QLatin1String(Constants::IDE_VERSION_DISPLAY); return appInfo().displayVersion;
} }
QString UtilsJsExtension::toNativeSeparators(const QString &in) const QString UtilsJsExtension::toNativeSeparators(const QString &in) const

View File

@@ -23,7 +23,6 @@
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/fileutils.h> #include <coreplugin/fileutils.h>
#include <app/app_version.h>
#include <extensionsystem/pluginerroroverview.h> #include <extensionsystem/pluginerroroverview.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h> #include <extensionsystem/pluginspec.h>
@@ -43,6 +42,7 @@
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QGuiApplication>
#include <QJsonObject> #include <QJsonObject>
#include <QLabel> #include <QLabel>
#include <QMenu> #include <QMenu>
@@ -191,18 +191,25 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
expander->registerVariable("Config:LastFileDialogDirectory", Tr::tr("The directory last visited in a file dialog."), expander->registerVariable("Config:LastFileDialogDirectory", Tr::tr("The directory last visited in a file dialog."),
[] { return DocumentManager::fileDialogLastVisitedDirectory().toString(); }); [] { return DocumentManager::fileDialogLastVisitedDirectory().toString(); });
expander->registerVariable("HostOs:isWindows", expander->registerVariable("HostOs:isWindows",
Tr::tr("Is %1 running on Windows?").arg(Constants::IDE_DISPLAY_NAME), Tr::tr("Is %1 running on Windows?")
[] { return QVariant(Utils::HostOsInfo::isWindowsHost()).toString(); }); .arg(QGuiApplication::applicationDisplayName()),
[] {
return QVariant(Utils::HostOsInfo::isWindowsHost()).toString();
});
expander->registerVariable("HostOs:isOSX", expander->registerVariable("HostOs:isOSX",
Tr::tr("Is %1 running on OS X?").arg(Constants::IDE_DISPLAY_NAME), Tr::tr("Is %1 running on OS X?")
.arg(QGuiApplication::applicationDisplayName()),
[] { return QVariant(Utils::HostOsInfo::isMacHost()).toString(); }); [] { return QVariant(Utils::HostOsInfo::isMacHost()).toString(); });
expander->registerVariable("HostOs:isLinux", expander->registerVariable("HostOs:isLinux",
Tr::tr("Is %1 running on Linux?").arg(Constants::IDE_DISPLAY_NAME), Tr::tr("Is %1 running on Linux?")
.arg(QGuiApplication::applicationDisplayName()),
[] { return QVariant(Utils::HostOsInfo::isLinuxHost()).toString(); }); [] { return QVariant(Utils::HostOsInfo::isLinuxHost()).toString(); });
expander->registerVariable("HostOs:isUnix", expander->registerVariable("HostOs:isUnix",
Tr::tr("Is %1 running on any unix-based platform?") Tr::tr("Is %1 running on any unix-based platform?")
.arg(Constants::IDE_DISPLAY_NAME), .arg(QGuiApplication::applicationDisplayName()),
[] { return QVariant(Utils::HostOsInfo::isAnyUnixHost()).toString(); }); [] {
return QVariant(Utils::HostOsInfo::isAnyUnixHost()).toString();
});
expander->registerVariable("HostOs:PathListSeparator", expander->registerVariable("HostOs:PathListSeparator",
Tr::tr("The path list separator for the platform."), Tr::tr("The path list separator for the platform."),
[] { return QString(Utils::HostOsInfo::pathListSeparator()); }); [] { return QString(Utils::HostOsInfo::pathListSeparator()); });
@@ -211,7 +218,7 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
[] { return QString(Utils::HostOsInfo::withExecutableSuffix("")); }); [] { return QString(Utils::HostOsInfo::withExecutableSuffix("")); });
expander->registerVariable("IDE:ResourcePath", expander->registerVariable("IDE:ResourcePath",
Tr::tr("The directory where %1 finds its pre-installed resources.") Tr::tr("The directory where %1 finds its pre-installed resources.")
.arg(Constants::IDE_DISPLAY_NAME), .arg(QGuiApplication::applicationDisplayName()),
[] { return ICore::resourcePath().toString(); }); [] { return ICore::resourcePath().toString(); });
expander->registerPrefix("CurrentDate:", Tr::tr("The current date (QDate formatstring)."), expander->registerPrefix("CurrentDate:", Tr::tr("The current date (QDate formatstring)."),
[](const QString &fmt) { return QDate::currentDate().toString(fmt); }); [](const QString &fmt) { return QDate::currentDate().toString(fmt); });
@@ -398,7 +405,7 @@ void CorePlugin::checkSettings()
const QString errorMsg = Tr::tr("The settings file \"%1\" is not writable.\n" const QString errorMsg = Tr::tr("The settings file \"%1\" is not writable.\n"
"You will not be able to store any %2 settings.") "You will not be able to store any %2 settings.")
.arg(QDir::toNativeSeparators(userSettings->fileName()), .arg(QDir::toNativeSeparators(userSettings->fileName()),
QLatin1String(Core::Constants::IDE_DISPLAY_NAME)); QGuiApplication::applicationDisplayName());
showMsgBox(errorMsg, QMessageBox::Warning); showMsgBox(errorMsg, QMessageBox::Warning);
} }
return; return;
@@ -410,10 +417,12 @@ void CorePlugin::checkSettings()
errorDetails = Tr::tr("The file is invalid."); errorDetails = Tr::tr("The file is invalid.");
break; break;
} }
const QString errorMsg = Tr::tr("Error reading settings file \"%1\": %2\n" const QString errorMsg
= Tr::tr("Error reading settings file \"%1\": %2\n"
"You will likely experience further problems using this instance of %3.") "You will likely experience further problems using this instance of %3.")
.arg(QDir::toNativeSeparators(userSettings->fileName()), errorDetails, .arg(QDir::toNativeSeparators(userSettings->fileName()),
QLatin1String(Core::Constants::IDE_DISPLAY_NAME)); errorDetails,
QGuiApplication::applicationDisplayName());
showMsgBox(errorMsg, QMessageBox::Critical); showMsgBox(errorMsg, QMessageBox::Critical);
} }
@@ -429,10 +438,11 @@ void CorePlugin::warnAboutCrashReporing()
"To enable this feature go to %2."); "To enable this feature go to %2.");
if (Utils::HostOsInfo::isMacHost()) { if (Utils::HostOsInfo::isMacHost()) {
warnStr = warnStr.arg(QLatin1String(Core::Constants::IDE_DISPLAY_NAME), warnStr = warnStr.arg(QGuiApplication::applicationDisplayName(),
Core::Constants::IDE_DISPLAY_NAME + Tr::tr(" > Preferences > Environment > System")); QGuiApplication::applicationDisplayName()
+ Tr::tr(" > Preferences > Environment > System"));
} else { } else {
warnStr = warnStr.arg(QLatin1String(Core::Constants::IDE_DISPLAY_NAME), warnStr = warnStr.arg(QGuiApplication::applicationDisplayName(),
Tr::tr("Edit > Preferences > Environment > System")); Tr::tr("Edit > Preferences > Environment > System"));
} }
@@ -462,12 +472,15 @@ QString CorePlugin::msgCrashpadInformation()
"for processing. Crashpad may capture arbitrary contents from crashed process " "for processing. Crashpad may capture arbitrary contents from crashed process "
"memory, including user sensitive information, URLs, and whatever other content " "memory, including user sensitive information, URLs, and whatever other content "
"users have trusted %1 with. The collected crash reports are however only used " "users have trusted %1 with. The collected crash reports are however only used "
"for the sole purpose of fixing bugs.").arg(Core::Constants::IDE_DISPLAY_NAME) "for the sole purpose of fixing bugs.")
.arg(QGuiApplication::applicationDisplayName())
+ "<br><br>" + Tr::tr("More information:") + "<br><br>" + Tr::tr("More information:")
+ "<br><a href='https://chromium.googlesource.com/crashpad/crashpad/+/master/doc/" + "<br><a href='https://chromium.googlesource.com/crashpad/crashpad/+/master/doc/"
"overview_design.md'>" + Tr::tr("Crashpad Overview") + "</a>" "overview_design.md'>"
"<br><a href='https://sentry.io/security/'>" + Tr::tr("%1 security policy").arg("Sentry.io") + Tr::tr("Crashpad Overview")
+ "</a>"; + "</a>"
"<br><a href='https://sentry.io/security/'>"
+ Tr::tr("%1 security policy").arg("Sentry.io") + "</a>";
} }
ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown() ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown()

View File

@@ -19,8 +19,6 @@ Project {
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "Aggregation" } Depends { name: "Aggregation" }
Depends { name: "app_version_header" }
cpp.dynamicLibraries: { cpp.dynamicLibraries: {
if (qbs.targetOS.contains("windows")) if (qbs.targetOS.contains("windows"))
return ["ole32", "user32"] return ["ole32", "user32"]

View File

@@ -35,8 +35,6 @@
#include "../settingsdatabase.h" #include "../settingsdatabase.h"
#include "../vcsmanager.h" #include "../vcsmanager.h"
#include <app/app_version.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -2161,7 +2159,7 @@ void EditorManagerPrivate::updateWindowTitleForDocument(IDocument *document, QWi
if (!windowTitle.isEmpty()) if (!windowTitle.isEmpty())
windowTitle.append(dashSep); windowTitle.append(dashSep);
windowTitle.append(Core::Constants::IDE_DISPLAY_NAME); windowTitle.append(QGuiApplication::applicationDisplayName());
window->window()->setWindowTitle(windowTitle); window->window()->setWindowTitle(windowTitle);
window->window()->setWindowFilePath(filePath.path()); window->window()->setWindowFilePath(filePath.path());

View File

@@ -11,8 +11,6 @@
#include "documentmanager.h" #include "documentmanager.h"
#include "editormanager/editormanager.h" #include "editormanager/editormanager.h"
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/macroexpander.h> #include <utils/macroexpander.h>

View File

@@ -7,11 +7,10 @@
#include "dialogs/settingsdialog.h" #include "dialogs/settingsdialog.h"
#include "windowsupport.h" #include "windowsupport.h"
#include <app/app_version.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/appinfo.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -440,7 +439,7 @@ FilePath ICore::userResourcePath(const QString &rel)
{ {
// Create qtcreator dir if it doesn't yet exist // Create qtcreator dir if it doesn't yet exist
const QString configDir = QFileInfo(settings(QSettings::UserScope)->fileName()).path(); const QString configDir = QFileInfo(settings(QSettings::UserScope)->fileName()).path();
const QString urp = configDir + '/' + QLatin1String(Constants::IDE_ID); const QString urp = configDir + '/' + appInfo().id;
if (!QFileInfo::exists(urp + QLatin1Char('/'))) { if (!QFileInfo::exists(urp + QLatin1Char('/'))) {
QDir dir; QDir dir;
@@ -467,7 +466,7 @@ FilePath ICore::cacheResourcePath(const QString &rel)
FilePath ICore::installerResourcePath(const QString &rel) FilePath ICore::installerResourcePath(const QString &rel)
{ {
return FilePath::fromString(settings(QSettings::SystemScope)->fileName()).parentDir() return FilePath::fromString(settings(QSettings::SystemScope)->fileName()).parentDir()
/ Constants::IDE_ID / rel; / appInfo().id / rel;
} }
/*! /*!
@@ -487,15 +486,18 @@ QString ICore::pluginPath()
*/ */
QString ICore::userPluginPath() QString ICore::userPluginPath()
{ {
const QVersionNumber appVersion = QVersionNumber::fromString(
QCoreApplication::applicationVersion());
QString pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QString pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost()) if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost())
pluginPath += "/data"; pluginPath += "/data";
pluginPath += '/' + QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR) + '/'; pluginPath += '/' + QCoreApplication::organizationName() + '/';
pluginPath += QLatin1String(Utils::HostOsInfo::isMacHost() ? Core::Constants::IDE_DISPLAY_NAME pluginPath += Utils::HostOsInfo::isMacHost() ? QGuiApplication::applicationDisplayName()
: Core::Constants::IDE_ID); : appInfo().id;
pluginPath += "/plugins/"; pluginPath += "/plugins/";
pluginPath += QString::number(IDE_VERSION_MAJOR) + '.' + QString::number(IDE_VERSION_MINOR) pluginPath += QString::number(appVersion.majorVersion()) + '.'
+ '.' + QString::number(IDE_VERSION_RELEASE); + QString::number(appVersion.minorVersion()) + '.'
+ QString::number(appVersion.microVersion());
return pluginPath; return pluginPath;
} }
@@ -518,11 +520,6 @@ FilePath ICore::crashReportsPath()
return libexecPath("crashpad_reports/reports"); return libexecPath("crashpad_reports/reports");
} }
QString ICore::ideDisplayName()
{
return Constants::IDE_DISPLAY_NAME;
}
static QString clangIncludePath(const QString &clangVersion) static QString clangIncludePath(const QString &clangVersion)
{ {
return "/lib/clang/" + clangVersion + "/include"; return "/lib/clang/" + clangVersion + "/include";
@@ -619,10 +616,10 @@ static QString compilerString()
QString ICore::versionString() QString ICore::versionString()
{ {
QString ideVersionDescription; QString ideVersionDescription;
if (QLatin1String(Constants::IDE_VERSION_LONG) != QLatin1String(Constants::IDE_VERSION_DISPLAY)) if (QCoreApplication::applicationVersion() != appInfo().displayVersion)
ideVersionDescription = Tr::tr(" (%1)").arg(QLatin1String(Constants::IDE_VERSION_LONG)); ideVersionDescription = Tr::tr(" (%1)").arg(QCoreApplication::applicationVersion());
return Tr::tr("%1 %2%3").arg(QLatin1String(Constants::IDE_DISPLAY_NAME), return Tr::tr("%1 %2%3").arg(QGuiApplication::applicationDisplayName(),
QLatin1String(Constants::IDE_VERSION_DISPLAY), appInfo().displayVersion,
ideVersionDescription); ideVersionDescription);
} }

View File

@@ -80,8 +80,6 @@ public:
static Utils::FilePath libexecPath(const QString &rel = {}); static Utils::FilePath libexecPath(const QString &rel = {});
static Utils::FilePath crashReportsPath(); static Utils::FilePath crashReportsPath();
static QString ideDisplayName();
static QString versionString(); static QString versionString();
static QMainWindow *mainWindow(); static QMainWindow *mainWindow();

View File

@@ -47,8 +47,6 @@
#include "versiondialog.h" #include "versiondialog.h"
#include "windowsupport.h" #include "windowsupport.h"
#include <app/app_version.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -126,7 +124,7 @@ MainWindow::MainWindow()
, m_lowPrioAdditionalContexts(Constants::C_GLOBAL) , m_lowPrioAdditionalContexts(Constants::C_GLOBAL)
, m_settingsDatabase( , m_settingsDatabase(
new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(), new SettingsDatabase(QFileInfo(PluginManager::settings()->fileName()).path(),
QLatin1String(Constants::IDE_CASED_ID), QCoreApplication::applicationName(),
this)) this))
, m_progressManager(new ProgressManagerPrivate) , m_progressManager(new ProgressManagerPrivate)
, m_jsExpander(JsExpander::createGlobalJsExpander()) , m_jsExpander(JsExpander::createGlobalJsExpander())
@@ -145,7 +143,7 @@ MainWindow::MainWindow()
HistoryCompleter::setSettings(PluginManager::settings()); HistoryCompleter::setSettings(PluginManager::settings());
setWindowTitle(Constants::IDE_DISPLAY_NAME); setWindowTitle(QGuiApplication::applicationDisplayName());
if (HostOsInfo::isLinuxHost()) if (HostOsInfo::isLinuxHost())
QApplication::setWindowIcon(Icons::QTCREATORLOGO_BIG.icon()); QApplication::setWindowIcon(Icons::QTCREATORLOGO_BIG.icon());
QString baseName = QApplication::style()->objectName(); QString baseName = QApplication::style()->objectName();
@@ -384,10 +382,10 @@ void MainWindow::closeEvent(QCloseEvent *event)
return; return;
} }
if (m_askConfirmationBeforeExit && if (m_askConfirmationBeforeExit
(QMessageBox::question(this, && (QMessageBox::question(this,
Tr::tr("Exit %1?").arg(Constants::IDE_DISPLAY_NAME), Tr::tr("Exit %1?").arg(QGuiApplication::applicationDisplayName()),
Tr::tr("Exit %1?").arg(Constants::IDE_DISPLAY_NAME), Tr::tr("Exit %1?").arg(QGuiApplication::applicationDisplayName()),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
QMessageBox::No) QMessageBox::No)
== QMessageBox::No)) { == QMessageBox::No)) {
@@ -762,7 +760,7 @@ void MainWindow::registerDefaultActions()
// Debug Qt Creator menu // Debug Qt Creator menu
mtools->appendGroup(Constants::G_TOOLS_DEBUG); mtools->appendGroup(Constants::G_TOOLS_DEBUG);
ActionContainer *mtoolsdebug = ActionManager::createMenu(Constants::M_TOOLS_DEBUG); ActionContainer *mtoolsdebug = ActionManager::createMenu(Constants::M_TOOLS_DEBUG);
mtoolsdebug->menu()->setTitle(Tr::tr("Debug %1").arg(Constants::IDE_DISPLAY_NAME)); mtoolsdebug->menu()->setTitle(Tr::tr("Debug %1").arg(QGuiApplication::applicationDisplayName()));
mtools->addMenu(mtoolsdebug, Constants::G_TOOLS_DEBUG); mtools->addMenu(mtoolsdebug, Constants::G_TOOLS_DEBUG);
m_loggerAction = new QAction(Tr::tr("Show Logs..."), this); m_loggerAction = new QAction(Tr::tr("Show Logs..."), this);
@@ -867,9 +865,14 @@ void MainWindow::registerDefaultActions()
// About IDE Action // About IDE Action
icon = QIcon::fromTheme(QLatin1String("help-about")); icon = QIcon::fromTheme(QLatin1String("help-about"));
if (HostOsInfo::isMacHost()) if (HostOsInfo::isMacHost())
tmpaction = new QAction(icon, Tr::tr("About &%1").arg(Constants::IDE_DISPLAY_NAME), this); // it's convention not to add dots to the about menu tmpaction = new QAction(icon,
Tr::tr("About &%1").arg(QGuiApplication::applicationDisplayName()),
this); // it's convention not to add dots to the about menu
else else
tmpaction = new QAction(icon, Tr::tr("About &%1...").arg(Constants::IDE_DISPLAY_NAME), this); tmpaction
= new QAction(icon,
Tr::tr("About &%1...").arg(QGuiApplication::applicationDisplayName()),
this);
tmpaction->setMenuRole(QAction::AboutRole); tmpaction->setMenuRole(QAction::AboutRole);
cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_QTCREATOR); cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_QTCREATOR);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT); mhelp->addAction(cmd, Constants::G_HELP_ABOUT);

View File

@@ -8,8 +8,6 @@
#include "icore.h" #include "icore.h"
#include "plugininstallwizard.h" #include "plugininstallwizard.h"
#include <app/app_version.h>
#include <extensionsystem/plugindetailsview.h> #include <extensionsystem/plugindetailsview.h>
#include <extensionsystem/pluginerrorview.h> #include <extensionsystem/pluginerrorview.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>

View File

@@ -23,11 +23,10 @@
#include <utils/wizard.h> #include <utils/wizard.h>
#include <utils/wizardpage.h> #include <utils/wizardpage.h>
#include <app/app_version.h>
#include <QButtonGroup> #include <QButtonGroup>
#include <QDir> #include <QDir>
#include <QDirIterator> #include <QDirIterator>
#include <QGuiApplication>
#include <QLabel> #include <QLabel>
#include <QMessageBox> #include <QMessageBox>
#include <QPushButton> #include <QPushButton>
@@ -164,14 +163,16 @@ void checkContents(QPromise<ArchiveIssue> &promise, const FilePath &tempDir)
return; return;
if (coreplugin->provides(found->name, found->version)) if (coreplugin->provides(found->name, found->version))
return; return;
promise.addResult(ArchiveIssue{ promise.addResult(
Tr::tr("Plugin requires an incompatible version of %1 (%2).") ArchiveIssue{Tr::tr("Plugin requires an incompatible version of %1 (%2).")
.arg(Constants::IDE_DISPLAY_NAME).arg(found->version), InfoLabel::Error}); .arg(QGuiApplication::applicationDisplayName(), found->version),
InfoLabel::Error});
return; // successful / no error return; // successful / no error
} }
} }
promise.addResult(ArchiveIssue{Tr::tr("Did not find %1 plugin.") promise.addResult(
.arg(Constants::IDE_DISPLAY_NAME), InfoLabel::Error}); ArchiveIssue{Tr::tr("Did not find %1 plugin.").arg(QGuiApplication::applicationDisplayName()),
InfoLabel::Error});
} }
class CheckArchivePage : public WizardPage class CheckArchivePage : public WizardPage
@@ -306,17 +307,16 @@ public:
localInstall->setChecked(!m_data->installIntoApplication); localInstall->setChecked(!m_data->installIntoApplication);
auto localLabel = new QLabel(Tr::tr("The plugin will be available to all compatible %1 " auto localLabel = new QLabel(Tr::tr("The plugin will be available to all compatible %1 "
"installations, but only for the current user.") "installations, but only for the current user.")
.arg(Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
localLabel->setWordWrap(true); localLabel->setWordWrap(true);
localLabel->setAttribute(Qt::WA_MacSmallSize, true); localLabel->setAttribute(Qt::WA_MacSmallSize, true);
auto appInstall = new QRadioButton( auto appInstall = new QRadioButton(
Tr::tr("%1 installation").arg(Constants::IDE_DISPLAY_NAME)); Tr::tr("%1 installation").arg(QGuiApplication::applicationDisplayName()));
appInstall->setChecked(m_data->installIntoApplication); appInstall->setChecked(m_data->installIntoApplication);
auto appLabel = new QLabel( auto appLabel = new QLabel(Tr::tr("The plugin will be available only to this %1 "
Tr::tr("The plugin will be available only to this %1 "
"installation, but for all users that can access it.") "installation, but for all users that can access it.")
.arg(Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
appLabel->setWordWrap(true); appLabel->setWordWrap(true);
appLabel->setAttribute(Qt::WA_MacSmallSize, true); appLabel->setAttribute(Qt::WA_MacSmallSize, true);

View File

@@ -15,8 +15,6 @@
#include "patchtool.h" #include "patchtool.h"
#include "vcsmanager.h" #include "vcsmanager.h"
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/checkablemessagebox.h> #include <utils/checkablemessagebox.h>
#include <utils/elidinglabel.h> #include <utils/elidinglabel.h>
@@ -31,6 +29,7 @@
#include <QCheckBox> #include <QCheckBox>
#include <QComboBox> #include <QComboBox>
#include <QCoreApplication> #include <QCoreApplication>
#include <QGuiApplication>
#include <QLineEdit> #include <QLineEdit>
#include <QMessageBox> #include <QMessageBox>
#include <QPushButton> #include <QPushButton>
@@ -217,7 +216,7 @@ public:
"modified files. If %1 is restarted after " "modified files. If %1 is restarted after "
"a crash or power failure, it asks whether to " "a crash or power failure, it asks whether to "
"recover the auto-saved content.") "recover the auto-saved content.")
.arg(Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
m_autoSaveRefactoringCheckBox->setChecked(EditorManager::autoSaveAfterRefactoring()); m_autoSaveRefactoringCheckBox->setChecked(EditorManager::autoSaveAfterRefactoring());
m_autoSaveRefactoringCheckBox->setToolTip( m_autoSaveRefactoringCheckBox->setToolTip(
Tr::tr("Automatically saves all open files " Tr::tr("Automatically saves all open files "

View File

@@ -8,15 +8,15 @@
#include "coreicons.h" #include "coreicons.h"
#include "icore.h" #include "icore.h"
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/appinfo.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QGridLayout> #include <QGridLayout>
#include <QGuiApplication>
#include <QKeyEvent> #include <QKeyEvent>
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
@@ -32,17 +32,18 @@ VersionDialog::VersionDialog(QWidget *parent)
if (Utils::HostOsInfo::isLinuxHost()) if (Utils::HostOsInfo::isLinuxHost())
setWindowIcon(Icons::QTCREATORLOGO_BIG.icon()); setWindowIcon(Icons::QTCREATORLOGO_BIG.icon());
setWindowTitle(Tr::tr("About %1").arg(Core::Constants::IDE_DISPLAY_NAME)); setWindowTitle(Tr::tr("About %1").arg(QGuiApplication::applicationDisplayName()));
auto layout = new QGridLayout(this); auto layout = new QGridLayout(this);
layout->setSizeConstraint(QLayout::SetFixedSize); layout->setSizeConstraint(QLayout::SetFixedSize);
const Utils::AppInfo appInfo = Utils::appInfo();
QString ideRev; QString ideRev;
#ifdef IDE_REVISION #ifdef IDE_REVISION
const QString revUrl = QString::fromLatin1(Constants::IDE_REVISION_URL);
const QString rev = QString::fromLatin1(Constants::IDE_REVISION_STR);
ideRev = Tr::tr("<br/>From revision %1<br/>") ideRev = Tr::tr("<br/>From revision %1<br/>")
.arg(revUrl.isEmpty() ? rev .arg(appInfo.revisionUrl.isEmpty()
: QString::fromLatin1("<a href=\"%1\">%2</a>").arg(revUrl, rev)); ? appInfo.revision
: QString::fromLatin1("<a href=\"%1\">%2</a>")
.arg(appInfo.revisionUrl, appInfo.revision));
#endif #endif
QString buildDateInfo; QString buildDateInfo;
#ifdef QTC_SHOW_BUILD_DATE #ifdef QTC_SHOW_BUILD_DATE
@@ -71,8 +72,8 @@ VersionDialog::VersionDialog(QWidget *parent)
buildDateInfo, buildDateInfo,
ideRev, ideRev,
additionalInfo.isEmpty() ? QString() : br + additionalInfo + br, additionalInfo.isEmpty() ? QString() : br + additionalInfo + br,
QLatin1String(Constants::IDE_YEAR), appInfo.year,
QLatin1String(Constants::IDE_AUTHOR)) appInfo.author)
+ "<br/>" + "<br/>"
+ Tr::tr("The Qt logo as well as Qt®, Qt Quick®, Built with Qt®, Boot to Qt®, " + Tr::tr("The Qt logo as well as Qt®, Qt Quick®, Built with Qt®, Boot to Qt®, "
"Qt Quick Compiler®, Qt Enterprise®, Qt Mobile® and Qt Embedded® are " "Qt Quick Compiler®, Qt Enterprise®, Qt Mobile® and Qt Embedded® are "

View File

@@ -10,14 +10,13 @@
#include "coreplugintr.h" #include "coreplugintr.h"
#include "icore.h" #include "icore.h"
#include <app/app_version.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <QAction> #include <QAction>
#include <QEvent> #include <QEvent>
#include <QGuiApplication>
#include <QMenu> #include <QMenu>
#include <QWidget> #include <QWidget>
#include <QWindowStateChangeEvent> #include <QWindowStateChangeEvent>
@@ -188,7 +187,7 @@ void WindowList::updateTitle(QWidget *window)
QTC_ASSERT(index >= 0, return); QTC_ASSERT(index >= 0, return);
QTC_ASSERT(index < m_windowActions.size(), return); QTC_ASSERT(index < m_windowActions.size(), return);
QString title = window->windowTitle(); QString title = window->windowTitle();
if (title.endsWith(QStringLiteral("- ") + Constants::IDE_DISPLAY_NAME)) if (title.endsWith(QStringLiteral("- ") + QGuiApplication::applicationDisplayName()))
title.chop(12); title.chop(12);
m_windowActions.at(index)->setText(Utils::quoteAmpersands(title.trimmed())); m_windowActions.at(index)->setText(Utils::quoteAmpersands(title.trimmed()));
} }

View File

@@ -13,7 +13,6 @@
#include "cpptoolsreuse.h" #include "cpptoolsreuse.h"
#include "symbolfinder.h" #include "symbolfinder.h"
#include <app/app_version.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <texteditor/basehoverhandler.h> #include <texteditor/basehoverhandler.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>

View File

@@ -8,7 +8,6 @@
#include "cpptoolsreuse.h" #include "cpptoolsreuse.h"
#include "cppworkingcopy.h" #include "cppworkingcopy.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectmacro.h> #include <projectexplorer/projectmacro.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>

View File

@@ -13,8 +13,6 @@ QtcPlugin {
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "app_version_header" }
pluginTestDepends: [ pluginTestDepends: [
"QmakeProjectManager", "QmakeProjectManager",
"QbsProjectManager", "QbsProjectManager",

View File

@@ -6,7 +6,6 @@
#include "cppeditorplugin.h" #include "cppeditorplugin.h"
#include "cppeditortr.h" #include "cppeditortr.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
@@ -20,6 +19,7 @@
#include <QComboBox> #include <QComboBox>
#include <QCoreApplication> #include <QCoreApplication>
#include <QFile> #include <QFile>
#include <QGuiApplication>
#include <QLineEdit> #include <QLineEdit>
#include <QLocale> #include <QLocale>
#include <QSettings> #include <QSettings>
@@ -435,7 +435,8 @@ void CppFileSettingsWidget::slotEdit()
if (path.isEmpty()) if (path.isEmpty())
return; return;
FileSaver saver(path, QIODevice::Text); FileSaver saver(path, QIODevice::Text);
saver.write(Tr::tr(licenseTemplateTemplate).arg(Core::Constants::IDE_DISPLAY_NAME).toUtf8()); saver.write(
Tr::tr(licenseTemplateTemplate).arg(QGuiApplication::applicationDisplayName()).toUtf8());
if (!saver.finalize(this)) if (!saver.finalize(this))
return; return;
setLicenseTemplatePath(path); setLicenseTemplatePath(path);

View File

@@ -7,8 +7,6 @@
#include "cdbparsehelpers.h" #include "cdbparsehelpers.h"
#include "stringinputstream.h" #include "stringinputstream.h"
#include <app/app_version.h>
#include <debugger/breakhandler.h> #include <debugger/breakhandler.h>
#include <debugger/debuggeractions.h> #include <debugger/debuggeractions.h>
#include <debugger/debuggercore.h> #include <debugger/debuggercore.h>
@@ -56,6 +54,7 @@
#include <cppeditor/cppworkingcopy.h> #include <cppeditor/cppworkingcopy.h>
#include <QDir> #include <QDir>
#include <QGuiApplication>
#include <QRegularExpression> #include <QRegularExpression>
#include <cctype> #include <cctype>
@@ -340,9 +339,9 @@ void CdbEngine::setupEngine()
"If you build %2 from sources and want to use a CDB executable " "If you build %2 from sources and want to use a CDB executable "
"with another bitness than your %2 build, " "with another bitness than your %2 build, "
"you will need to build a separate CDB extension with the " "you will need to build a separate CDB extension with the "
"same bitness as the CDB you want to use."). "same bitness as the CDB you want to use.")
arg(QDir::toNativeSeparators(extensionFi.absoluteFilePath()), .arg(QDir::toNativeSeparators(extensionFi.absoluteFilePath()),
QString(Core::Constants::IDE_DISPLAY_NAME))); QGuiApplication::applicationDisplayName()));
return; return;
} }

View File

@@ -17,7 +17,6 @@ Project {
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
pluginTestDepends: [ pluginTestDepends: [
"QmakeProjectManager" "QmakeProjectManager"

View File

@@ -12,8 +12,6 @@
#include "registerpostmortemaction.h" #include "registerpostmortemaction.h"
#endif #endif
#include <app/app_version.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -21,6 +19,7 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QDebug> #include <QDebug>
#include <QGuiApplication>
using namespace Utils; using namespace Utils;
@@ -267,7 +266,7 @@ DebuggerSettings::DebuggerSettings()
raiseOnInterrupt.setSettingsKey(debugModeGroup, "RaiseOnInterrupt"); raiseOnInterrupt.setSettingsKey(debugModeGroup, "RaiseOnInterrupt");
raiseOnInterrupt.setDefaultValue(true); raiseOnInterrupt.setDefaultValue(true);
raiseOnInterrupt.setLabelText(Tr::tr("Bring %1 to foreground when application interrupts") raiseOnInterrupt.setLabelText(Tr::tr("Bring %1 to foreground when application interrupts")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
autoQuit.setSettingsKey(debugModeGroup, "AutoQuit"); autoQuit.setSettingsKey(debugModeGroup, "AutoQuit");
autoQuit.setLabelText(Tr::tr("Automatically Quit Debugger")); autoQuit.setLabelText(Tr::tr("Automatically Quit Debugger"));
@@ -318,12 +317,10 @@ DebuggerSettings::DebuggerSettings()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
registerForPostMortem = new RegisterPostMortemAction; registerForPostMortem = new RegisterPostMortemAction;
registerForPostMortem->setSettingsKey(debugModeGroup, "RegisterForPostMortem"); registerForPostMortem->setSettingsKey(debugModeGroup, "RegisterForPostMortem");
registerForPostMortem->setToolTip( registerForPostMortem->setToolTip(Tr::tr("Registers %1 for debugging crashed applications.")
Tr::tr("Registers %1 for debugging crashed applications.") .arg(QGuiApplication::applicationDisplayName()));
.arg(Core::Constants::IDE_DISPLAY_NAME));
registerForPostMortem->setLabelText( registerForPostMortem->setLabelText(
Tr::tr("Use %1 for post-mortem debugging") Tr::tr("Use %1 for post-mortem debugging").arg(QGuiApplication::applicationDisplayName()));
.arg(Core::Constants::IDE_DISPLAY_NAME));
#else #else
// Some dummy. // Some dummy.
registerForPostMortem = new BoolAspect; registerForPostMortem = new BoolAspect;

View File

@@ -7,8 +7,6 @@
#include "debuggerruncontrol.h" #include "debuggerruncontrol.h"
#include "debuggertr.h" #include "debuggertr.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/sshparameters.h> #include <projectexplorer/devicesupport/sshparameters.h>
@@ -30,6 +28,7 @@
#include <QDir> #include <QDir>
#include <QFormLayout> #include <QFormLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QGuiApplication>
#include <QLabel> #include <QLabel>
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include <QPushButton> #include <QPushButton>
@@ -563,15 +562,18 @@ static QString cdbRemoteHelp()
const QString ext32 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(false)); const QString ext32 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(false));
const QString ext64 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(true)); const QString ext64 = QDir::toNativeSeparators(CdbEngine::extensionLibraryName(true));
return Tr::tr( return Tr::
"<html><body><p>The remote CDB needs to load the matching %1 CDB extension " tr("<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 " "(<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>" "environment variable <code>%4</code> to point to its folder.</p><p>"
"Launch the remote CDB as <code>%5 &lt;executable&gt;</code> " "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>" "to use TCP/IP as communication protocol.</p><p>Enter the connection parameters as:</p>"
"<pre>%6</pre></body></html>") "<pre>%6</pre></body></html>")
.arg(QString(Core::Constants::IDE_DISPLAY_NAME), .arg(QGuiApplication::applicationDisplayName(),
ext32, ext64, QString("_NT_DEBUGGER_EXTENSION_PATH"), ext32,
ext64,
QString("_NT_DEBUGGER_EXTENSION_PATH"),
QString("cdb.exe -server tcp:port=1234"), QString("cdb.exe -server tcp:port=1234"),
QString(cdbConnectionSyntax)); QString(cdbConnectionSyntax));
} }

View File

@@ -31,8 +31,6 @@
#include "analyzer/analyzerconstants.h" #include "analyzer/analyzerconstants.h"
#include "analyzer/analyzermanager.h" #include "analyzer/analyzermanager.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
@@ -1673,8 +1671,9 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
AsynchronousMessageBox::warning( AsynchronousMessageBox::warning(
Tr::tr("Process Already Under Debugger Control"), Tr::tr("Process Already Under Debugger Control"),
Tr::tr("The process %1 is already under the control of a debugger.\n" Tr::tr("The process %1 is already under the control of a debugger.\n"
"%2 cannot attach to it.").arg(processInfo.processId) "%2 cannot attach to it.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(processInfo.processId)
.arg(QGuiApplication::applicationDisplayName()));
return nullptr; return nullptr;
} }

View File

@@ -34,7 +34,6 @@
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
@@ -45,11 +44,12 @@
#include <utils/temporaryfile.h> #include <utils/temporaryfile.h>
#include <QDirIterator> #include <QDirIterator>
#include <QGuiApplication>
#include <QJsonArray>
#include <QMessageBox> #include <QMessageBox>
#include <QProcess> #include <QProcess>
#include <QPushButton> #include <QPushButton>
#include <QRegularExpression> #include <QRegularExpression>
#include <QJsonArray>
using namespace Core; using namespace Core;
using namespace ProjectExplorer; using namespace ProjectExplorer;
@@ -1502,8 +1502,9 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
+ Tr::tr("The selected build of GDB supports Python scripting, " + Tr::tr("The selected build of GDB supports Python scripting, "
"but the used version %1.%2 is not sufficient for " "but the used version %1.%2 is not sufficient for "
"%3. Supported versions are Python 2.7 and 3.x.") "%3. Supported versions are Python 2.7 and 3.x.")
.arg(pythonMajor).arg(pythonMinor) .arg(pythonMajor)
.arg(Core::Constants::IDE_DISPLAY_NAME); .arg(pythonMinor)
.arg(QGuiApplication::applicationDisplayName());
showStatusMessage(out); showStatusMessage(out);
AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out); AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out);
} }
@@ -1516,7 +1517,7 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
if (msg.contains("Python scripting is not supported in this copy of GDB.")) { if (msg.contains("Python scripting is not supported in this copy of GDB.")) {
QString out1 = "The selected build of GDB does not support Python scripting."; QString out1 = "The selected build of GDB does not support Python scripting.";
QString out2 = QStringLiteral("It cannot be used in %1.") QString out2 = QStringLiteral("It cannot be used in %1.")
.arg(Core::Constants::IDE_DISPLAY_NAME); .arg(QGuiApplication::applicationDisplayName());
showStatusMessage(out1 + ' ' + out2); showStatusMessage(out1 + ' ' + out2);
AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out1 + "<br>" + out2); AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out1 + "<br>" + out2);
} }

View File

@@ -12,19 +12,18 @@
#include <QDebug> #include <QDebug>
#include <QTime> #include <QTime>
#include <QFileDialog>
#include <QGuiApplication>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>
#include <QMenu> #include <QMenu>
#include <QSyntaxHighlighter>
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include <QPushButton> #include <QPushButton>
#include <QFileDialog> #include <QSyntaxHighlighter>
#include <QToolButton> #include <QToolButton>
#include <aggregation/aggregate.h> #include <aggregation/aggregate.h>
#include <app/app_version.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/findplaceholder.h> #include <coreplugin/findplaceholder.h>
#include <coreplugin/minisplitter.h> #include <coreplugin/minisplitter.h>
@@ -438,8 +437,10 @@ LogWindow::LogWindow(DebuggerEngine *engine)
setMinimumHeight(60); setMinimumHeight(60);
showOutput(LogWarning, showOutput(
Tr::tr("Note: This log contains possibly confidential information about your machine, " LogWarning,
Tr::tr(
"Note: This log contains possibly confidential information about your machine, "
"environment variables, in-memory data of the processes you are debugging, and more. " "environment variables, in-memory data of the processes you are debugging, and more. "
"It is never transferred over the internet by %1, and only stored " "It is never transferred over the internet by %1, and only stored "
"to disk if you manually use the respective option from the context menu, or through " "to disk if you manually use the respective option from the context menu, or through "
@@ -448,7 +449,7 @@ LogWindow::LogWindow(DebuggerEngine *engine)
"You may be asked to share the contents of this log when reporting bugs related " "You may be asked to share the contents of this log when reporting bugs related "
"to debugger operation. In this case, make sure your submission does not " "to debugger operation. In this case, make sure your submission does not "
"contain data you do not want to or you are not allowed to share.\n\n") "contain data you do not want to or you are not allowed to share.\n\n")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
} }
LogWindow::~LogWindow() LogWindow::~LogWindow()

View File

@@ -4,10 +4,8 @@
#include "procinterrupt.h" #include "procinterrupt.h"
#include "debuggerconstants.h" #include "debuggerconstants.h"
#include <app/app_version.h>
#include <QCoreApplication>
#include <QDir> #include <QDir>
#include <QGuiApplication>
#include <QProcess> // makes kill visible on Windows. #include <QProcess> // makes kill visible on Windows.
using namespace Debugger::Internal; using namespace Debugger::Internal;
@@ -128,7 +126,7 @@ GDB 32bit | Api | Api | NA | Win32
"on your own, checkout " "on your own, checkout "
"https://code.qt.io/cgit/qt-creator/binary-artifacts.git/.") "https://code.qt.io/cgit/qt-creator/binary-artifacts.git/.")
.arg(QDir::toNativeSeparators(executable), .arg(QDir::toNativeSeparators(executable),
QString(Core::Constants::IDE_DISPLAY_NAME)); QGuiApplication::applicationDisplayName());
break; break;
} }
switch (QProcess::execute(executable, QStringList(QString::number(pID)))) { switch (QProcess::execute(executable, QStringList(QString::number(pID)))) {

View File

@@ -36,8 +36,6 @@
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <app/app_version.h>
#include <utils/basetreeview.h> #include <utils/basetreeview.h>
#include <utils/fileinprojectfinder.h> #include <utils/fileinprojectfinder.h>
#include <utils/process.h> #include <utils/process.h>
@@ -48,6 +46,7 @@
#include <QDir> #include <QDir>
#include <QDockWidget> #include <QDockWidget>
#include <QFileInfo> #include <QFileInfo>
#include <QGuiApplication>
#include <QHostAddress> #include <QHostAddress>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
@@ -386,7 +385,7 @@ void QmlEngine::connectionStartupFailed()
auto infoBox = new QMessageBox(ICore::dialogParent()); auto infoBox = new QMessageBox(ICore::dialogParent());
infoBox->setIcon(QMessageBox::Critical); infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setWindowTitle(QGuiApplication::applicationDisplayName());
infoBox->setText(Tr::tr("Could not connect to the in-process QML debugger." infoBox->setText(Tr::tr("Could not connect to the in-process QML debugger."
"\nDo you want to retry?")); "\nDo you want to retry?"));
infoBox->setStandardButtons(QMessageBox::Retry | QMessageBox::Cancel | infoBox->setStandardButtons(QMessageBox::Retry | QMessageBox::Cancel |
@@ -407,7 +406,7 @@ void QmlEngine::appStartupFailed(const QString &errorMessage)
if (companionEngine()) { if (companionEngine()) {
auto infoBox = new QMessageBox(ICore::dialogParent()); auto infoBox = new QMessageBox(ICore::dialogParent());
infoBox->setIcon(QMessageBox::Critical); infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setWindowTitle(QGuiApplication::applicationDisplayName());
infoBox->setText(error); infoBox->setText(error);
infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help); infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
infoBox->setDefaultButton(QMessageBox::Ok); infoBox->setDefaultButton(QMessageBox::Ok);

View File

@@ -28,7 +28,6 @@
#include <texteditor/syntaxhighlighter.h> #include <texteditor/syntaxhighlighter.h>
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/basetreeview.h> #include <utils/basetreeview.h>
#include <utils/checkablemessagebox.h> #include <utils/checkablemessagebox.h>
@@ -269,7 +268,7 @@ public:
this, &SeparatedView::tabBarContextMenuRequested); this, &SeparatedView::tabBarContextMenuRequested);
tabBar()->setContextMenuPolicy(Qt::CustomContextMenu); tabBar()->setContextMenuPolicy(Qt::CustomContextMenu);
setWindowFlags(windowFlags() | Qt::Window); setWindowFlags(windowFlags() | Qt::Window);
setWindowTitle(Tr::tr("Debugger - %1").arg(Core::Constants::IDE_DISPLAY_NAME)); setWindowTitle(Tr::tr("Debugger - %1").arg(QGuiApplication::applicationDisplayName()));
QVariant geometry = SessionManager::value("DebuggerSeparateWidgetGeometry"); QVariant geometry = SessionManager::value("DebuggerSeparateWidgetGeometry");
if (geometry.isValid()) { if (geometry.isValid()) {

View File

@@ -11,7 +11,6 @@ QtcPlugin {
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "app_version_header" }
pluginRecommends: [ pluginRecommends: [
"CppEditor" "CppEditor"

View File

@@ -12,7 +12,6 @@
#include <projectexplorer/projectexplorericons.h> #include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/customwizard/customwizard.h> #include <projectexplorer/customwizard/customwizard.h>
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/filewizardpage.h> #include <utils/filewizardpage.h>
@@ -97,9 +96,10 @@ GenericProjectWizard::GenericProjectWizard()
setIcon(ProjectExplorer::Icons::WIZARD_IMPORT_AS_PROJECT.icon()); setIcon(ProjectExplorer::Icons::WIZARD_IMPORT_AS_PROJECT.icon());
setDisplayName(Tr::tr("Import Existing Project")); setDisplayName(Tr::tr("Import Existing Project"));
setId("Z.Makefile"); setId("Z.Makefile");
setDescription(Tr::tr("Imports existing projects that do not use qmake, CMake, Qbs, Meson, or Autotools. " setDescription(
Tr::tr("Imports existing projects that do not use qmake, CMake, Qbs, Meson, or Autotools. "
"This allows you to use %1 as a code editor.") "This allows you to use %1 as a code editor.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
setCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY)); setCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY));
setDisplayCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY)); setDisplayCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY));
setFlags(Core::IWizardFactory::PlatformIndependent); setFlags(Core::IWizardFactory::PlatformIndependent);

View File

@@ -16,8 +16,6 @@ Project {
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "app_version_header" }
Depends { name: "qlitehtml"; required: false } Depends { name: "qlitehtml"; required: false }
cpp.defines: { cpp.defines: {

View File

@@ -20,8 +20,6 @@
#include "searchtaskhandler.h" #include "searchtaskhandler.h"
#include "topicchooser.h" #include "topicchooser.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
@@ -568,7 +566,7 @@ HelpViewer *HelpPluginPrivate::showHelpUrl(const QUrl &url, Core::HelpManager::H
// QtHelp doesn't know about versions, add the version number and use that // QtHelp doesn't know about versions, add the version number and use that
QUrl versioned = url; QUrl versioned = url;
versioned.setHost(qtcreatorUnversionedID + "." versioned.setHost(qtcreatorUnversionedID + "."
+ QString::fromLatin1(Core::Constants::IDE_VERSION_LONG).remove('.')); + QCoreApplication::applicationVersion().remove('.'));
return showHelpUrl(versioned, location); return showHelpUrl(versioned, location);
} }

View File

@@ -21,10 +21,10 @@
#include "macwebkithelpviewer.h" #include "macwebkithelpviewer.h"
#endif #endif
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/appinfo.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -35,6 +35,7 @@
#include <QHelpEngine> #include <QHelpEngine>
#include <QHelpLink> #include <QHelpLink>
#include <QMutexLocker> #include <QMutexLocker>
#include <QVersionNumber>
#include <optional> #include <optional>
@@ -113,9 +114,12 @@ LocalHelpManager *LocalHelpManager::instance()
QString LocalHelpManager::defaultHomePage() QString LocalHelpManager::defaultHomePage()
{ {
const auto version = QVersionNumber::fromString(QCoreApplication::applicationVersion());
static const QString url = QString::fromLatin1("qthelp://org.qt-project.qtcreator." static const QString url = QString::fromLatin1("qthelp://org.qt-project.qtcreator."
"%1%2%3/doc/index.html").arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR) "%1%2%3/doc/index.html")
.arg(IDE_VERSION_RELEASE); .arg(version.majorVersion())
.arg(version.minorVersion())
.arg(version.microVersion());
return url; return url;
} }
@@ -496,12 +500,13 @@ bool LocalHelpManager::canOpenOnlineHelp(const QUrl &url)
bool LocalHelpManager::openOnlineHelp(const QUrl &url) bool LocalHelpManager::openOnlineHelp(const QUrl &url)
{ {
static const QString unversionedLocalDomainName = QString("org.qt-project.%1").arg(Core::Constants::IDE_ID); static const QString unversionedLocalDomainName
= QString("org.qt-project.%1").arg(Utils::appInfo().id);
if (canOpenOnlineHelp(url)) { if (canOpenOnlineHelp(url)) {
QString urlPrefix = "http://doc.qt.io/"; QString urlPrefix = "http://doc.qt.io/";
if (url.authority().startsWith(unversionedLocalDomainName)) { if (url.authority().startsWith(unversionedLocalDomainName)) {
urlPrefix.append(Core::Constants::IDE_ID); urlPrefix.append(Utils::appInfo().id);
} else { } else {
const auto host = url.host(); const auto host = url.host();
const auto dot = host.lastIndexOf('.'); const auto dot = host.lastIndexOf('.');

View File

@@ -5,7 +5,7 @@ elseif (MINGW)
endif() endif()
add_qtc_plugin(LanguageClient add_qtc_plugin(LanguageClient
PUBLIC_DEPENDS LanguageServerProtocol Qt::Core app_version PUBLIC_DEPENDS LanguageServerProtocol Qt::Core
PLUGIN_DEPENDS ProjectExplorer Core TextEditor PLUGIN_DEPENDS ProjectExplorer Core TextEditor
SOURCES SOURCES
callhierarchy.cpp callhierarchy.h callhierarchy.cpp callhierarchy.h

View File

@@ -20,8 +20,6 @@
#include "progressmanager.h" #include "progressmanager.h"
#include "semantichighlightsupport.h" #include "semantichighlightsupport.h"
#include <app/app_version.h>
#include <coreplugin/editormanager/documentmodel.h> #include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
@@ -54,10 +52,12 @@
#include <texteditor/texteditoractionhandler.h> #include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditorsettings.h> #include <texteditor/texteditorsettings.h>
#include <utils/appinfo.h>
#include <utils/mimeutils.h> #include <utils/mimeutils.h>
#include <utils/process.h> #include <utils/process.h>
#include <QDebug> #include <QDebug>
#include <QGuiApplication>
#include <QJsonDocument> #include <QJsonDocument>
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QMessageBox> #include <QMessageBox>
@@ -148,8 +148,8 @@ public:
{ {
using namespace ProjectExplorer; using namespace ProjectExplorer;
m_clientInfo.setName(Core::Constants::IDE_DISPLAY_NAME); m_clientInfo.setName(QGuiApplication::applicationDisplayName());
m_clientInfo.setVersion(Core::Constants::IDE_VERSION_DISPLAY); m_clientInfo.setVersion(Utils::appInfo().displayVersion);
m_clientProviders.completionAssistProvider = new LanguageClientCompletionAssistProvider(q); m_clientProviders.completionAssistProvider = new LanguageClientCompletionAssistProvider(q);
m_clientProviders.functionHintProvider = new FunctionHintAssistProvider(q); m_clientProviders.functionHintProvider = new FunctionHintAssistProvider(q);

View File

@@ -17,8 +17,6 @@ QtcPlugin {
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
files: [ files: [
"callhierarchy.cpp", "callhierarchy.cpp",
"callhierarchy.h", "callhierarchy.h",

View File

@@ -4,7 +4,6 @@
#include "macro.h" #include "macro.h"
#include "macroevent.h" #include "macroevent.h"
#include <app/app_version.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QFileInfo> #include <QFileInfo>
@@ -35,8 +34,8 @@ public:
QList<MacroEvent> events; QList<MacroEvent> events;
}; };
Macro::MacroPrivate::MacroPrivate() : Macro::MacroPrivate::MacroPrivate()
version(QLatin1String(Core::Constants::IDE_VERSION_LONG)) : version(QCoreApplication::applicationVersion())
{ {
} }

View File

@@ -10,8 +10,6 @@ QtcPlugin {
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
files: [ files: [
"actionmacrohandler.cpp", "actionmacrohandler.cpp",
"actionmacrohandler.h", "actionmacrohandler.h",

View File

@@ -7,7 +7,6 @@ QtcPlugin {
Depends { name: "Qt.widgets" } Depends { name: "Qt.widgets" }
Depends { name: "Qt.testlib"; condition: qtc.testsEnabled } Depends { name: "Qt.testlib"; condition: qtc.testsEnabled }
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "app_version_header" }
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "BareMetal" } Depends { name: "BareMetal" }

View File

@@ -15,7 +15,6 @@ Project {
Depends { name: "CppEditor" } Depends { name: "CppEditor" }
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "app_version_header" }
cpp.includePaths: "." cpp.includePaths: "."

View File

@@ -6,11 +6,10 @@
#include "mesonpluginconstants.h" #include "mesonpluginconstants.h"
#include "mesonprojectmanagertr.h" #include "mesonprojectmanagertr.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QCoreApplication> #include <QGuiApplication>
#include <QVariantMap> #include <QVariantMap>
#include <iterator> #include <iterator>
@@ -27,7 +26,7 @@ static QString entryName(int index)
ToolsSettingsAccessor::ToolsSettingsAccessor() ToolsSettingsAccessor::ToolsSettingsAccessor()
{ {
setDocType("QtCreatorMesonTools"); setDocType("QtCreatorMesonTools");
setApplicationDisplayName(Core::Constants::IDE_DISPLAY_NAME); setApplicationDisplayName(QGuiApplication::applicationDisplayName());
setBaseFilePath(Core::ICore::userResourcePath(Constants::ToolsSettings::FILENAME)); setBaseFilePath(Core::ICore::userResourcePath(Constants::ToolsSettings::FILENAME));
} }

View File

@@ -9,7 +9,6 @@ QtcPlugin {
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "Tracing" } Depends { name: "Tracing" }
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "app_version_header" }
Depends { Depends {
name: "Qt" name: "Qt"

View File

@@ -6,9 +6,8 @@
#include "perfprofilertr.h" #include "perfprofilertr.h"
#include "perfprofilertracefile.h" #include "perfprofilertracefile.h"
#include <app/app_version.h>
#include <QFile> #include <QFile>
#include <QGuiApplication>
#include <QtEndian> #include <QtEndian>
namespace PerfProfiler { namespace PerfProfiler {
@@ -252,7 +251,7 @@ void PerfProfilerTraceFile::readFromDevice()
"generated with older versions of %3.") "generated with older versions of %3.")
.arg(QString::fromLatin1(magic)) .arg(QString::fromLatin1(magic))
.arg(QString::fromLatin1(Constants::PerfZqfileMagic)) .arg(QString::fromLatin1(Constants::PerfZqfileMagic))
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
return; return;
} }

View File

@@ -5,14 +5,12 @@
#include "../projectexplorertr.h" #include "../projectexplorertr.h"
#include <app/app_version.h>
#include <utils/winutils.h> #include <utils/winutils.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/processinfo.h> #include <utils/processinfo.h>
#include <QCoreApplication>
#include <QDir> #include <QDir>
#include <QGuiApplication>
#include <QProcess> #include <QProcess>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@@ -171,7 +169,7 @@ GDB 32bit | Api | Api | N/A | Win32
"yourself, check out https://code.qt.io/cgit/" "yourself, check out https://code.qt.io/cgit/"
"qt-creator/binary-artifacts.git/.") "qt-creator/binary-artifacts.git/.")
.arg(QDir::toNativeSeparators(executable), .arg(QDir::toNativeSeparators(executable),
QString(Core::Constants::IDE_DISPLAY_NAME))); QGuiApplication::applicationDisplayName()));
} }
switch (QProcess::execute(executable, QStringList(QString::number(pid)))) { switch (QProcess::execute(executable, QStringList(QString::number(pid)))) {
case -2: case -2:

View File

@@ -11,9 +11,8 @@
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/settingsaccessor.h> #include <utils/settingsaccessor.h>
#include <app/app_version.h>
#include <QDebug> #include <QDebug>
#include <QGuiApplication>
using namespace Utils; using namespace Utils;
@@ -38,7 +37,7 @@ public:
AbiFlavorAccessor() AbiFlavorAccessor()
{ {
setDocType("QtCreatorExtraAbi"); setDocType("QtCreatorExtraAbi");
setApplicationDisplayName(Core::Constants::IDE_DISPLAY_NAME); setApplicationDisplayName(QGuiApplication::applicationDisplayName());
setBaseFilePath(Core::ICore::installerResourcePath("abi.xml")); setBaseFilePath(Core::ICore::installerResourcePath("abi.xml"));
addVersionUpgrader(std::make_unique<AbiFlavorUpgraderV0>()); addVersionUpgrader(std::make_unique<AbiFlavorUpgraderV0>());
} }

View File

@@ -84,7 +84,6 @@
#include "projecttree.h" #include "projecttree.h"
#include "projectwelcomepage.h" #include "projectwelcomepage.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
@@ -2864,10 +2863,11 @@ bool ProjectExplorerPlugin::coreAboutToClose()
QPushButton *closeAnyway = box.addButton(Tr::tr("Cancel Build && Close"), QMessageBox::AcceptRole); QPushButton *closeAnyway = box.addButton(Tr::tr("Cancel Build && Close"), QMessageBox::AcceptRole);
QPushButton *cancelClose = box.addButton(Tr::tr("Do Not Close"), QMessageBox::RejectRole); QPushButton *cancelClose = box.addButton(Tr::tr("Do Not Close"), QMessageBox::RejectRole);
box.setDefaultButton(cancelClose); box.setDefaultButton(cancelClose);
box.setWindowTitle(Tr::tr("Close %1?").arg(Core::Constants::IDE_DISPLAY_NAME)); box.setWindowTitle(Tr::tr("Close %1?").arg(QGuiApplication::applicationDisplayName()));
box.setText(Tr::tr("A project is currently being built.")); box.setText(Tr::tr("A project is currently being built."));
box.setInformativeText(Tr::tr("Do you want to cancel the build process and close %1 anyway?") box.setInformativeText(
.arg(Core::Constants::IDE_DISPLAY_NAME)); Tr::tr("Do you want to cancel the build process and close %1 anyway?")
.arg(QGuiApplication::applicationDisplayName()));
box.exec(); box.exec();
if (box.clickedButton() != closeAnyway) if (box.clickedButton() != closeAnyway)
return false; return false;

View File

@@ -10,7 +10,6 @@ Project {
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
Depends { name: "libclang"; required: false } Depends { name: "libclang"; required: false }
Depends { name: "clang_defines" } Depends { name: "clang_defines" }

View File

@@ -5,7 +5,7 @@
#include "projectexplorertr.h" #include "projectexplorertr.h"
#include <coreplugin/icore.h> #include <QGuiApplication>
namespace ProjectExplorer { namespace ProjectExplorer {
namespace Constants { namespace Constants {
@@ -18,7 +18,7 @@ QString msgAutoDetected()
QString msgAutoDetectedToolTip() QString msgAutoDetectedToolTip()
{ {
return Tr::tr("Automatically managed by %1 or the installer.") return Tr::tr("Automatically managed by %1 or the installer.")
.arg(Core::ICore::ideDisplayName()); .arg(QGuiApplication::applicationDisplayName());
} }
QString msgManual() QString msgManual()

View File

@@ -12,8 +12,6 @@
#include "projecttree.h" #include "projecttree.h"
#include "target.h" #include "target.h"
#include <app/app_version.h>
#include <coreplugin/documentmanager.h> #include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/iversioncontrol.h> #include <coreplugin/iversioncontrol.h>
@@ -35,11 +33,12 @@
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QFileInfo> #include <QFileInfo>
#include <QFont> #include <QFont>
#include <QGuiApplication>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>
#include <QLoggingCategory>
#include <QMessageBox> #include <QMessageBox>
#include <QMimeData> #include <QMimeData>
#include <QLoggingCategory>
#include <QPushButton> #include <QPushButton>
#include <QRadioButton> #include <QRadioButton>
#include <QVBoxLayout> #include <QVBoxLayout>
@@ -600,7 +599,7 @@ public:
setWindowTitle(Tr::tr("Choose Drop Action")); setWindowTitle(Tr::tr("Choose Drop Action"));
const bool offerFileIo = !defaultTargetDir.isEmpty(); const bool offerFileIo = !defaultTargetDir.isEmpty();
auto * const layout = new QVBoxLayout(this); auto * const layout = new QVBoxLayout(this);
const QString idename(Core::Constants::IDE_DISPLAY_NAME); const QString idename(QGuiApplication::applicationDisplayName());
layout->addWidget(new QLabel(Tr::tr("You just dragged some files from one project node to " layout->addWidget(new QLabel(Tr::tr("You just dragged some files from one project node to "
"another.\nWhat should %1 do now?").arg(idename), this)); "another.\nWhat should %1 do now?").arg(idename), this));
auto * const copyButton = new QRadioButton(this); auto * const copyButton = new QRadioButton(this);

View File

@@ -6,8 +6,6 @@
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h" #include "projectexplorertr.h"
#include <app/app_version.h>
#include <coreplugin/basefilewizard.h> #include <coreplugin/basefilewizard.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -151,11 +149,13 @@ SimpleProjectWizard::SimpleProjectWizard()
setIcon(ProjectExplorer::Icons::WIZARD_IMPORT_AS_PROJECT.icon()); setIcon(ProjectExplorer::Icons::WIZARD_IMPORT_AS_PROJECT.icon());
setDisplayName(Tr::tr("Import as qmake or CMake Project (Limited Functionality)")); setDisplayName(Tr::tr("Import as qmake or CMake Project (Limited Functionality)"));
setId("Z.DummyProFile"); setId("Z.DummyProFile");
setDescription(Tr::tr("Imports existing projects that do not use qmake, CMake, Qbs, Meson, or Autotools.<p>" setDescription(
Tr::tr(
"Imports existing projects that do not use qmake, CMake, Qbs, Meson, or Autotools.<p>"
"This creates a project file that allows you to use %1 as a code editor " "This creates a project file that allows you to use %1 as a code editor "
"and as a launcher for debugging and analyzing tools. " "and as a launcher for debugging and analyzing tools. "
"If you want to build the project, you might need to edit the generated project file.") "If you want to build the project, you might need to edit the generated project file.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
setCategory(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY); setCategory(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY);
setDisplayCategory(Tr::tr(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY)); setDisplayCategory(Tr::tr(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY));
setFlags(IWizardFactory::PlatformIndependent); setFlags(IWizardFactory::PlatformIndependent);
@@ -217,16 +217,16 @@ GeneratedFiles generateQmakeFiles(const SimpleProjectWizardDialog *wizard,
GeneratedFile generatedProFile(proFileName); GeneratedFile generatedProFile(proFileName);
generatedProFile.setAttributes(Core::GeneratedFile::OpenProjectAttribute); generatedProFile.setAttributes(Core::GeneratedFile::OpenProjectAttribute);
generatedProFile.setContents( generatedProFile.setContents(
"# Created by and for " + QLatin1String(Core::Constants::IDE_DISPLAY_NAME) "# Created by and for " + QGuiApplication::applicationDisplayName()
+ " This file was created for editing the project sources only.\n" + " This file was created for editing the project sources only.\n"
"# You may attempt to use it for building too, by modifying this file here.\n\n" "# You may attempt to use it for building too, by modifying this file here.\n\n"
"#TARGET = " + projectName + "\n\n" "#TARGET = "
"QT = " + wizard->qtModules() + "\n\n" + projectName
+ proHeaders + "\n\n" + "\n\n"
+ proSources + "\n\n" "QT = "
+ proIncludes + "\n\n" + wizard->qtModules() + "\n\n" + proHeaders + "\n\n" + proSources + "\n\n" + proIncludes
"#DEFINES = \n\n" + "\n\n"
); "#DEFINES = \n\n");
return GeneratedFiles{generatedProFile}; return GeneratedFiles{generatedProFile};
} }
@@ -290,22 +290,22 @@ GeneratedFiles generateCmakeFiles(const SimpleProjectWizardDialog *wizard,
GeneratedFile generatedProFile(projectFileName); GeneratedFile generatedProFile(projectFileName);
generatedProFile.setAttributes(Core::GeneratedFile::OpenProjectAttribute); generatedProFile.setAttributes(Core::GeneratedFile::OpenProjectAttribute);
generatedProFile.setContents( generatedProFile.setContents(
"# Created by and for " + QLatin1String(Core::Constants::IDE_DISPLAY_NAME) "# Created by and for " + QGuiApplication::applicationDisplayName()
+ " This file was created for editing the project sources only.\n" + " This file was created for editing the project sources only.\n"
"# You may attempt to use it for building too, by modifying this file here.\n\n" "# You may attempt to use it for building too, by modifying this file here.\n\n"
"cmake_minimum_required(VERSION 3.5)\n" "cmake_minimum_required(VERSION 3.5)\n"
"project("+ projectName +")\n\n" "project("
+ projectName
+ ")\n\n"
"set(CMAKE_AUTOUIC ON)\n" "set(CMAKE_AUTOUIC ON)\n"
"set(CMAKE_AUTOMOC ON)\n" "set(CMAKE_AUTOMOC ON)\n"
"set(CMAKE_AUTORCC ON)\n" "set(CMAKE_AUTORCC ON)\n"
"set(CMAKE_CXX_STANDARD 11)\n" "set(CMAKE_CXX_STANDARD 11)\n"
"set(CMAKE_CXX_STANDARD_REQUIRED ON)\n" "set(CMAKE_CXX_STANDARD_REQUIRED ON)\n"
+ components + "\n\n" + components + "\n\n" + includes + "\n\n" + srcs
+ includes + "\n\n" + "\n\n"
+ srcs + "\n\n"
"add_executable(${CMAKE_PROJECT_NAME} ${SRCS})\n\n" "add_executable(${CMAKE_PROJECT_NAME} ${SRCS})\n\n"
+ libs + libs);
);
return GeneratedFiles{generatedProFile}; return GeneratedFiles{generatedProFile};
} }

View File

@@ -19,8 +19,6 @@
#include "targetsetuppage.h" #include "targetsetuppage.h"
#include "task.h" #include "task.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h> #include <coreplugin/modemanager.h>

View File

@@ -7,7 +7,6 @@
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "projectexplorertr.h" #include "projectexplorertr.h"
#include <app/app_version.h>
#include <texteditor/fontsettings.h> #include <texteditor/fontsettings.h>
#include <texteditor/textmark.h> #include <texteditor/textmark.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
@@ -15,6 +14,7 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QFileInfo> #include <QFileInfo>
#include <QGuiApplication>
#include <QTextStream> #include <QTextStream>
using namespace Utils; using namespace Utils;
@@ -62,7 +62,7 @@ Task Task::compilerMissingTask()
return BuildSystemTask(Task::Error, return BuildSystemTask(Task::Error,
Tr::tr("%1 needs a compiler set up to build. " Tr::tr("%1 needs a compiler set up to build. "
"Configure a compiler in the kit options.") "Configure a compiler in the kit options.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
} }
void Task::setMark(TextEditor::TextMark *mark) void Task::setMark(TextEditor::TextMark *mark)

View File

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

View File

@@ -10,11 +10,10 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <app/app_version.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QGuiApplication>
#include <QLoggingCategory> #include <QLoggingCategory>
using namespace Utils; using namespace Utils;
@@ -172,7 +171,7 @@ static ToolChainOperations mergeToolChainLists(const Toolchains &systemFileTcs,
ToolChainSettingsAccessor::ToolChainSettingsAccessor() ToolChainSettingsAccessor::ToolChainSettingsAccessor()
{ {
setDocType("QtCreatorToolChains"); setDocType("QtCreatorToolChains");
setApplicationDisplayName(Core::Constants::IDE_DISPLAY_NAME); setApplicationDisplayName(QGuiApplication::applicationDisplayName());
setBaseFilePath(Core::ICore::userResourcePath(TOOLCHAIN_FILENAME)); setBaseFilePath(Core::ICore::userResourcePath(TOOLCHAIN_FILENAME));
addVersionUpgrader(std::make_unique<ToolChainSettingsUpgraderV0>()); addVersionUpgrader(std::make_unique<ToolChainSettingsUpgraderV0>());

View File

@@ -13,7 +13,6 @@
#include "kit.h" #include "kit.h"
#include "kitmanager.h" #include "kitmanager.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
@@ -21,6 +20,7 @@
#include <utils/process.h> #include <utils/process.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QGuiApplication>
#include <QRegularExpression> #include <QRegularExpression>
using namespace Utils; using namespace Utils;
@@ -288,7 +288,7 @@ UserFileAccessor::UserFileAccessor(Project *project)
{ {
setStrategy(std::make_unique<VersionedBackUpStrategy>(this)); setStrategy(std::make_unique<VersionedBackUpStrategy>(this));
setDocType("QtCreatorProject"); setDocType("QtCreatorProject");
setApplicationDisplayName(Core::Constants::IDE_DISPLAY_NAME); setApplicationDisplayName(QGuiApplication::applicationDisplayName());
// Setup: // Setup:
const FilePath externalUser = externalUserFile(); const FilePath externalUser = externalUserFile();

View File

@@ -16,7 +16,6 @@ QtcPlugin {
Depends { name: "CppEditor" } Depends { name: "CppEditor" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "QmlJSTools" } Depends { name: "QmlJSTools" }
Depends { name: "app_version_header" }
files: [ files: [
"customqbspropertiesdialog.h", "customqbspropertiesdialog.h",

View File

@@ -8,7 +8,6 @@
#include "qbsprojectmanagertr.h" #include "qbsprojectmanagertr.h"
#include "qbssettings.h" #include "qbssettings.h"
#include <app/app_version.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
@@ -19,6 +18,7 @@
#include <QDir> #include <QDir>
#include <QEventLoop> #include <QEventLoop>
#include <QGuiApplication>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <QProcessEnvironment> #include <QProcessEnvironment>
@@ -243,7 +243,7 @@ QString QbsSession::errorString(QbsSession::Error error)
//: %1 == "Qt Creator" or "Qt Design Studio" //: %1 == "Qt Creator" or "Qt Design Studio"
return Tr::tr("The qbs API level is not compatible with " return Tr::tr("The qbs API level is not compatible with "
"what %1 expects.") "what %1 expects.")
.arg(Core::Constants::IDE_DISPLAY_NAME); .arg(QGuiApplication::applicationDisplayName());
} }
return QString(); // For dumb compilers. return QString(); // For dumb compilers.
} }

View File

@@ -6,7 +6,6 @@
#include "qbsprojectmanagerconstants.h" #include "qbsprojectmanagerconstants.h"
#include "qbsprojectmanagertr.h" #include "qbsprojectmanagertr.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <utils/environment.h> #include <utils/environment.h>
@@ -15,9 +14,9 @@
#include <utils/process.h> #include <utils/process.h>
#include <utils/qtcsettings.h> #include <utils/qtcsettings.h>
#include <QCoreApplication>
#include <QCheckBox> #include <QCheckBox>
#include <QFormLayout> #include <QFormLayout>
#include <QGuiApplication>
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
@@ -161,7 +160,7 @@ public:
m_versionLabel.setText(getQbsVersionString()); m_versionLabel.setText(getQbsVersionString());
//: %1 == "Qt Creator" or "Qt Design Studio" //: %1 == "Qt Creator" or "Qt Design Studio"
m_settingsDirCheckBox.setText(Tr::tr("Use %1 settings directory for Qbs") m_settingsDirCheckBox.setText(Tr::tr("Use %1 settings directory for Qbs")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
m_settingsDirCheckBox.setChecked(QbsSettings::useCreatorSettingsDirForQbs()); m_settingsDirCheckBox.setChecked(QbsSettings::useCreatorSettingsDirForQbs());
const auto layout = new QFormLayout(this); const auto layout = new QFormLayout(this);

View File

@@ -14,7 +14,6 @@ Project {
Depends { name: "CppEditor" } Depends { name: "CppEditor" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "ResourceEditor" } Depends { name: "ResourceEditor" }
Depends { name: "app_version_header" }
Group { Group {
name: "General" name: "General"

View File

@@ -7,8 +7,6 @@
#include <model.h> #include <model.h>
#include <app/app_version.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>

View File

@@ -5,7 +5,6 @@
#include "qmldesignerplugin.h" #include "qmldesignerplugin.h"
#include <app/app_version.h>
#include <edit3d/edit3dviewconfig.h> #include <edit3d/edit3dviewconfig.h>
#include <itemlibraryimport.h> #include <itemlibraryimport.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>

View File

@@ -39,7 +39,6 @@
#include <qmlprojectmanager/qmlproject.h> #include <qmlprojectmanager/qmlproject.h>
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
@@ -244,7 +243,7 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e
->addAction(cmd, Core::Constants::G_HELP_SUPPORT); ->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, &QAction::triggered, this, [this] { connect(action, &QAction::triggered, this, [this] {
lauchFeedbackPopupInternal(Core::Constants::IDE_DISPLAY_NAME); lauchFeedbackPopupInternal(QGuiApplication::applicationDisplayName());
}); });
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorMessage)) if (!Utils::HostOsInfo::canCreateOpenGLContext(errorMessage))

View File

@@ -7,8 +7,6 @@
#include "qmldesignerexternaldependencies.h" #include "qmldesignerexternaldependencies.h"
#include "qmldesignerplugin.h" #include "qmldesignerplugin.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <qmljseditor/qmljseditorconstants.h> #include <qmljseditor/qmljseditorconstants.h>
@@ -506,10 +504,11 @@ void SettingsPageWidget::apply()
for (const char * const key : restartNecessaryKeys) { for (const char * const key : restartNecessaryKeys) {
if (QmlDesignerPlugin::settings().value(key) != settings.value(key)) { if (QmlDesignerPlugin::settings().value(key) != settings.value(key)) {
QMessageBox::information(Core::ICore::dialogParent(), tr("Restart Required"), QMessageBox::information(Core::ICore::dialogParent(),
tr("Restart Required"),
tr("The made changes will take effect after a " tr("The made changes will take effect after a "
"restart of the QML Emulation layer or %1.") "restart of the QML Emulation layer or %1.")
.arg(Core::Constants::IDE_DISPLAY_NAME)); .arg(QGuiApplication::applicationDisplayName()));
break; break;
} }
} }

View File

@@ -6,7 +6,6 @@ QtcPlugin {
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "app_version_header" }
Depends { name: "Qt.quickwidgets" } Depends { name: "Qt.quickwidgets" }
files: [ files: [

View File

@@ -5,7 +5,6 @@
#include "designersettings.h" #include "designersettings.h"
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
@@ -19,7 +18,8 @@ namespace {
Utils::FilePath qmlPuppetExecutablePath(const Utils::FilePath &workingDirectory) Utils::FilePath qmlPuppetExecutablePath(const Utils::FilePath &workingDirectory)
{ {
return workingDirectory.pathAppended(QString{"qml2puppet-"} + Core::Constants::IDE_VERSION_LONG) return workingDirectory
.pathAppended(QString{"qml2puppet-"} + QCoreApplication::applicationVersion())
.withExecutableSuffix(); .withExecutableSuffix();
} }

View File

@@ -15,7 +15,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
Group { Group {
name: "General" name: "General"

View File

@@ -15,8 +15,6 @@
#include "qmlprofilertr.h" #include "qmlprofilertr.h"
#include "qmlprofilerviewmanager.h" #include "qmlprofilerviewmanager.h"
#include <app/app_version.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
@@ -333,7 +331,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
runWorker, [this, runWorker]() { runWorker, [this, runWorker]() {
auto infoBox = new QMessageBox(ICore::dialogParent()); auto infoBox = new QMessageBox(ICore::dialogParent());
infoBox->setIcon(QMessageBox::Critical); infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setWindowTitle(QGuiApplication::applicationDisplayName());
const int interval = d->m_profilerConnections->retryInterval(); const int interval = d->m_profilerConnections->retryInterval();
const int retries = d->m_profilerConnections->maximumRetries(); const int retries = d->m_profilerConnections->maximumRetries();

View File

@@ -9,8 +9,6 @@
#include "qtversionmanager.h" #include "qtversionmanager.h"
#include "qtversionfactory.h" #include "qtversionfactory.h"
#include <app/app_version.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/dialogs/restartdialog.h> #include <coreplugin/dialogs/restartdialog.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -803,14 +801,14 @@ void QtOptionsPageWidget::updateWidgets()
static QString settingsFile(const QString &baseDir) static QString settingsFile(const QString &baseDir)
{ {
return baseDir + (baseDir.isEmpty() ? "" : "/") + Core::Constants::IDE_SETTINGSVARIANT_STR + '/' return baseDir + (baseDir.isEmpty() ? "" : "/") + QCoreApplication::organizationName() + '/'
+ Core::Constants::IDE_CASED_ID + ".ini"; + QCoreApplication::applicationName() + ".ini";
} }
static QString qtVersionsFile(const QString &baseDir) static QString qtVersionsFile(const QString &baseDir)
{ {
return baseDir + (baseDir.isEmpty() ? "" : "/") + Core::Constants::IDE_SETTINGSVARIANT_STR + '/' return baseDir + (baseDir.isEmpty() ? "" : "/") + QCoreApplication::organizationName() + '/'
+ Core::Constants::IDE_ID + '/' + "qtversion.xml"; + QCoreApplication::applicationName() + '/' + "qtversion.xml";
} }
static std::optional<FilePath> currentlyLinkedQtDir(bool *hasInstallSettings) static std::optional<FilePath> currentlyLinkedQtDir(bool *hasInstallSettings)
@@ -847,12 +845,12 @@ static bool canLinkWithQt(QString *toolTip)
if (!Core::ICore::resourcePath().isWritableDir()) { if (!Core::ICore::resourcePath().isWritableDir()) {
canLink = false; canLink = false;
tip << Tr::tr("%1's resource directory is not writable.") tip << Tr::tr("%1's resource directory is not writable.")
.arg(Core::Constants::IDE_DISPLAY_NAME); .arg(QGuiApplication::applicationDisplayName());
} }
const FilePath link = installSettingsValue ? *installSettingsValue : FilePath(); const FilePath link = installSettingsValue ? *installSettingsValue : FilePath();
if (!link.isEmpty()) if (!link.isEmpty())
tip << Tr::tr("%1 is currently linked to \"%2\".") tip << Tr::tr("%1 is currently linked to \"%2\".")
.arg(QString(Core::Constants::IDE_DISPLAY_NAME), link.toUserOutput()); .arg(QGuiApplication::applicationDisplayName(), link.toUserOutput());
if (toolTip) if (toolTip)
*toolTip = tip.join("\n\n"); *toolTip = tip.join("\n\n");
return canLink; return canLink;

View File

@@ -6,7 +6,6 @@ Project {
QtcPlugin { QtcPlugin {
Depends { name: "Qt"; submodules: ["widgets", "xml"]; } Depends { name: "Qt"; submodules: ["widgets", "xml"]; }
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "app_version_header" }
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "ProParser" } Depends { name: "ProParser" }

View File

@@ -51,8 +51,6 @@
#include <QStandardPaths> #include <QStandardPaths>
#include <QXmlStreamWriter> #include <QXmlStreamWriter>
#include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/minisplitter.h> #include <coreplugin/minisplitter.h>

View File

@@ -13,8 +13,6 @@
#include <QXmlStreamReader> #include <QXmlStreamReader>
#include <QXmlStreamWriter> #include <QXmlStreamWriter>
#include <app/app_version.h>
using namespace ScxmlEditor::PluginInterface; using namespace ScxmlEditor::PluginInterface;
ScxmlDocument::ScxmlDocument(const QString &fileName, QObject *parent) ScxmlDocument::ScxmlDocument(const QString &fileName, QObject *parent)
@@ -62,7 +60,7 @@ void ScxmlDocument::clear(bool createRoot)
if (createRoot) { if (createRoot) {
pushRootTag(createScxmlTag()); pushRootTag(createScxmlTag());
rootTag()->setAttribute("qt:editorversion", QLatin1String(Core::Constants::IDE_VERSION_LONG)); rootTag()->setAttribute("qt:editorversion", QCoreApplication::applicationVersion());
auto ns = new ScxmlNamespace("qt", "http://www.qt.io/2015/02/scxml-ext"); auto ns = new ScxmlNamespace("qt", "http://www.qt.io/2015/02/scxml-ext");
ns->setTagVisibility("editorInfo", false); ns->setTagVisibility("editorInfo", false);
@@ -207,7 +205,7 @@ bool ScxmlDocument::load(QIODevice *io)
// Check editorversion // Check editorversion
m_hasLayouted = rootTag()->hasAttribute("qt:editorversion"); m_hasLayouted = rootTag()->hasAttribute("qt:editorversion");
rootTag()->setAttribute("qt:editorversion", QLatin1String(Core::Constants::IDE_VERSION_LONG)); rootTag()->setAttribute("qt:editorversion", QCoreApplication::applicationVersion());
} }
} }
@@ -363,7 +361,7 @@ void ScxmlDocument::load(const QString &fileName)
// If loading doesn't work, create root tag here // If loading doesn't work, create root tag here
if (m_rootTags.isEmpty()) { if (m_rootTags.isEmpty()) {
pushRootTag(createScxmlTag()); pushRootTag(createScxmlTag());
rootTag()->setAttribute("qt:editorversion", QLatin1String(Core::Constants::IDE_VERSION_LONG)); rootTag()->setAttribute("qt:editorversion", QCoreApplication::applicationVersion());
} }
auto ns = new ScxmlNamespace("qt", "http://www.qt.io/2015/02/scxml-ext"); auto ns = new ScxmlNamespace("qt", "http://www.qt.io/2015/02/scxml-ext");

View File

@@ -11,8 +11,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" } Depends { name: "QtSupport" }
Depends { name: "app_version_header" }
cpp.includePaths: base.concat([ cpp.includePaths: base.concat([
".", ".",
common.prefix, common.prefix,

View File

@@ -6,8 +6,6 @@
#include "qdsnewdialog.h" #include "qdsnewdialog.h"
#include <app/app_version.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/dialogs/restartdialog.h> #include <coreplugin/dialogs/restartdialog.h>
#include <coreplugin/documentmanager.h> #include <coreplugin/documentmanager.h>
@@ -39,6 +37,7 @@
#include <qmljs/qmljsmodelmanagerinterface.h> #include <qmljs/qmljsmodelmanagerinterface.h>
#include <utils/appinfo.h>
#include <utils/checkablemessagebox.h> #include <utils/checkablemessagebox.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/icon.h> #include <utils/icon.h>
@@ -166,7 +165,7 @@ public:
explicit UsageStatisticPluginModel(QObject *parent = nullptr) explicit UsageStatisticPluginModel(QObject *parent = nullptr)
: QObject(parent) : QObject(parent)
{ {
m_versionString = Core::Constants::IDE_VERSION_DISPLAY; m_versionString = Utils::appInfo().displayVersion;
setupModel(); setupModel();
} }
@@ -532,8 +531,7 @@ static bool showSplashScreen()
const QString lastQDSVersion = settings->value(lastQDSVersionEntry).toString(); const QString lastQDSVersion = settings->value(lastQDSVersionEntry).toString();
const QString currentVersion = Utils::appInfo().displayVersion;
const QString currentVersion = Core::Constants::IDE_VERSION_DISPLAY;
if (currentVersion != lastQDSVersion) { if (currentVersion != lastQDSVersion) {
settings->setValue(lastQDSVersionEntry, currentVersion); settings->setValue(lastQDSVersionEntry, currentVersion);

View File

@@ -7,7 +7,6 @@ QtcPlugin {
Depends { name: "Utils" } Depends { name: "Utils" }
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "app_version_header" }
files: [ files: [
"introductionwidget.cpp", "introductionwidget.cpp",

View File

@@ -7,8 +7,6 @@
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <app/app_version.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h> #include <coreplugin/actionmanager/command.h>
@@ -30,6 +28,7 @@
#include <utils/treemodel.h> #include <utils/treemodel.h>
#include <QDesktopServices> #include <QDesktopServices>
#include <QGuiApplication>
#include <QLabel> #include <QLabel>
#include <QMouseEvent> #include <QMouseEvent>
#include <QPainter> #include <QPainter>
@@ -187,7 +186,7 @@ public:
hbox->addSpacing(8); hbox->addSpacing(8);
auto ideNameLabel = new QLabel(Core::Constants::IDE_DISPLAY_NAME); auto ideNameLabel = new QLabel(QGuiApplication::applicationDisplayName());
ideNameLabel->setFont(welcomeFont); ideNameLabel->setFont(welcomeFont);
ideNameLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); ideNameLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
QPalette pal = palette(); QPalette pal = palette();

View File

@@ -8,7 +8,6 @@ QtcTool {
Depends { name: "Qt.widgets" } Depends { name: "Qt.widgets" }
Depends { name: "Qt.xml" } Depends { name: "Qt.xml" }
Depends { name: "Qt.network" } Depends { name: "Qt.network" }
Depends { name: "app_version_header" }
files: [ files: [
"cfutils.h", "cfutils.h",