Debugger: Fix registering QC as post mortem debugger

Change-Id: Ia8746b93fc3e03601fa0abdb73366a6fc03fb138
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2021-08-03 12:18:10 +02:00
parent b152f3ace8
commit bcab54172e

View File

@@ -84,13 +84,26 @@ public:
}.attachTo(this); }.attachTo(this);
} }
void apply() final { m_group.apply(); m_group.writeSettings(ICore::settings()); } void apply() final;
void finish() final { m_group.finish(); } void finish() final { m_group.finish(); }
private: private:
AspectContainer &m_group = debuggerSettings()->page1; AspectContainer &m_group = debuggerSettings()->page1;
}; };
void CommonOptionsPageWidget::apply()
{
const DebuggerSettings *s = debuggerSettings();
const bool originalPostMortem = s->registerForPostMortem->value();
const bool currentPostMortem = s->registerForPostMortem->volatileValue().toBool();
// explicitly trigger setValue() to override the setValueSilently() and trigger the registration
if (originalPostMortem != currentPostMortem)
s->registerForPostMortem->setValue(currentPostMortem);
m_group.apply();
m_group.writeSettings(ICore::settings());
}
CommonOptionsPage::CommonOptionsPage() CommonOptionsPage::CommonOptionsPage()
{ {
setId(DEBUGGER_COMMON_SETTINGS_ID); setId(DEBUGGER_COMMON_SETTINGS_ID);