Commit 2af8faeb authored by Tobias Hunger's avatar Tobias Hunger
Browse files

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: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 078942b7
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment