aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@digia.com>2013-06-03 12:56:49 +0200
committerTobias Hunger <tobias.hunger@digia.com>2013-06-03 15:32:50 +0200
commit2af8faeb91a4326d5c432a3d10dd03c6f8303b01 (patch)
treeeff76a764d2743a38d4443edfd4be2cfe4550762
parent078942b767525087700aa4603b606a50c37b9db3 (diff)
ProjectExplorerSettings: Keep environmentId.
Make sure to not change the environmentId when editing something in the settings page. Task-number: QTCREATORBUG-9359 Change-Id: I7fc891cb3a69f08b1c2ea3f963a2deb01ddca9b2 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/projectexplorer/projectexplorersettings.h3
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.cpp2
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.h2
4 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index ff3244c462..bf6afa3cee 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -3018,6 +3018,8 @@ void ProjectExplorerPlugin::setSession(QAction *action)
void ProjectExplorerPlugin::setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes)
{
+ QTC_ASSERT(d->m_projectExplorerSettings.environmentId == pes.environmentId, return);
+
if (d->m_projectExplorerSettings == pes)
return;
d->m_projectExplorerSettings = pes;
diff --git a/src/plugins/projectexplorer/projectexplorersettings.h b/src/plugins/projectexplorer/projectexplorersettings.h
index adf2b8a558..507bf4612a 100644
--- a/src/plugins/projectexplorer/projectexplorersettings.h
+++ b/src/plugins/projectexplorer/projectexplorersettings.h
@@ -81,7 +81,8 @@ inline bool operator==(const ProjectExplorerSettings &p1, const ProjectExplorerS
&& p1.useJom == p2.useJom
&& p1.autorestoreLastSession == p2.autorestoreLastSession
&& p1.prompToStopRunControl == p2.prompToStopRunControl
- && p1.maxAppOutputLines == p2.maxAppOutputLines;
+ && p1.maxAppOutputLines == p2.maxAppOutputLines
+ && p1.environmentId == p2.environmentId;
}
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
index c008919e8f..86d4577bb0 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
@@ -81,6 +81,7 @@ ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const
pes.useJom = m_ui.jomCheckbox->isChecked();
pes.prompToStopRunControl = m_ui.promptToStopRunControlCheckBox->isChecked();
pes.maxAppOutputLines = m_ui.maxAppOutputBox->value();
+ pes.environmentId = m_environmentId;
return pes;
}
@@ -98,6 +99,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &
m_ui.jomCheckbox->setChecked(pes.useJom);
m_ui.promptToStopRunControlCheckBox->setChecked(pes.prompToStopRunControl);
m_ui.maxAppOutputBox->setValue(pes.maxAppOutputLines);
+ m_environmentId = pes.environmentId;
}
QString ProjectExplorerSettingsWidget::projectsDirectory() const
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.h b/src/plugins/projectexplorer/projectexplorersettingspage.h
index a2e40a79c3..75f63dcfb0 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.h
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.h
@@ -34,6 +34,7 @@
#include "ui_projectexplorersettingspage.h"
#include <QPointer>
+#include <QUuid>
namespace ProjectExplorer {
namespace Internal {
@@ -70,6 +71,7 @@ private:
Ui::ProjectExplorerSettingsPageUi m_ui;
mutable QString m_searchKeywords;
+ QUuid m_environmentId;
};
class ProjectExplorerSettingsPage : public Core::IOptionsPage