forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user