summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/settingsaccessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/settingsaccessor.cpp')
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index a4b774aaa7..923b1ba370 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -734,7 +734,7 @@ void SettingsAccessor::backupUserFile() const
// Do we need to do a backup?
const QString origName = oldSettings.fileName().toString();
QString backupName = origName;
- if (oldSettings.environmentId() != creatorId())
+ if (!oldSettings.environmentId().isEmpty() && oldSettings.environmentId() != creatorId())
backupName += QLatin1String(".") + QString::fromLatin1(oldSettings.environmentId()).mid(1, 7);
if (oldSettings.version() != currentVersion()) {
if (m_handlers.contains(oldSettings.version()))
@@ -774,7 +774,7 @@ SettingsAccessor::SettingsData SettingsAccessor::readUserSettings() const
"<p>All settings files were either too new or too "
"old to be read.</p>"),
QMessageBox::Ok);
- } else if (result.environmentId() != creatorId()) {
+ } else if (!result.environmentId().isEmpty() && result.environmentId() != creatorId()) {
// Wrong environment!
QMessageBox msgBox(
QMessageBox::Question,
@@ -873,7 +873,7 @@ SettingsAccessor::SettingsData SettingsAccessor::findBestSettings(const QStringL
continue;
}
- if (!tmp.environmentId().isEmpty() && tmp.environmentId() == creatorId()) {
+ if (tmp.environmentId().isEmpty() || tmp.environmentId() == creatorId()) {
if (tmp.version() > newestMatching.version())
newestMatching = tmp;
} else {