diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp index 9adf9fcc174..6af26979abb 100644 --- a/src/plugins/projectexplorer/settingsaccessor.cpp +++ b/src/plugins/projectexplorer/settingsaccessor.cpp @@ -25,8 +25,6 @@ #include "settingsaccessor.h" -#include - #include #include @@ -117,6 +115,7 @@ public: std::unique_ptr m_writer; QByteArray m_settingsId; QString m_displayName; + QString m_applicationDisplayName; QString m_userSuffix; QString m_sharedSuffix; @@ -448,7 +447,7 @@ SettingsAccessor::IssueInfo SettingsAccessor::findIssues(const QVariantMap &data "version of %2 was used are ignored, and " "changes made now will not be propagated to " "the newer version.

").arg(path.toUserOutput()) - .arg(Core::Constants::IDE_DISPLAY_NAME); + .arg(d->m_applicationDisplayName); result.buttons.insert(QMessageBox::Ok, Continue); } @@ -464,7 +463,7 @@ SettingsAccessor::IssueInfo SettingsAccessor::findIssues(const QVariantMap &data "

Did you work with this project on another machine or " "using a different settings path before?

" "

Do you still want to load the settings file \"%2\"?

") - .arg(Core::Constants::IDE_DISPLAY_NAME) + .arg(d->m_applicationDisplayName) .arg(path.toUserOutput()); result.defaultButton = QMessageBox::No; result.escapeButton = QMessageBox::No; @@ -596,6 +595,11 @@ void SettingsAccessor::setDisplayName(const QString &dn) d->m_displayName = dn; } +void SettingsAccessor::setApplicationDisplayName(const QString &dn) +{ + d->m_applicationDisplayName = dn; +} + /* Will always return the default name first (if applicable) */ FileNameList SettingsAccessor::settingsFiles(const QString &suffix) const { @@ -721,7 +725,7 @@ QVariantMap SettingsAccessor::readSharedSettings(QWidget *parent) const "The version of your .shared file is not " "supported by %1. " "Do you want to try loading it anyway?") - .arg(Core::Constants::IDE_DISPLAY_NAME), + .arg(d->m_applicationDisplayName), QMessageBox::Yes | QMessageBox::No, parent); msgBox.setDefaultButton(QMessageBox::No); diff --git a/src/plugins/projectexplorer/settingsaccessor.h b/src/plugins/projectexplorer/settingsaccessor.h index 65652c27a02..d01826081cd 100644 --- a/src/plugins/projectexplorer/settingsaccessor.h +++ b/src/plugins/projectexplorer/settingsaccessor.h @@ -112,6 +112,7 @@ public: protected: void setSettingsId(const QByteArray &id); void setDisplayName(const QString &dn); + void setApplicationDisplayName(const QString &dn); QVariantMap readFile(const Utils::FileName &path) const; QVariantMap upgradeSettings(const QVariantMap &data) const; diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index 69d6342337d..2ec9f875de0 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -42,10 +42,6 @@ #include #include -#include -#include -#include - using namespace Utils; using namespace ProjectExplorer; using namespace ProjectExplorer::Internal; @@ -357,6 +353,7 @@ UserFileAccessor::UserFileAccessor(Project *project) : { setSettingsId(ProjectExplorerPlugin::projectExplorerSettings().environmentId.toByteArray()); setDisplayName(project->displayName()); + setApplicationDisplayName(Core::Constants::IDE_DISPLAY_NAME); // Register Upgraders: addVersionUpgrader(std::make_unique(this));