Debugger: Use the new hint to determine why settings should be saved

Change-Id: I5f8e2caceaa9769fc99e91bf1e29470fa17320bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2019-06-03 16:03:53 +02:00
parent 70fecd518e
commit c978afb42e

View File

@@ -288,13 +288,12 @@ DebuggerMainWindow::DebuggerMainWindow()
cmd->setAttribute(Command::CA_Hide);
viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
connect(ICore::instance(), &ICore::saveSettingsRequested, this, [this] {
connect(ICore::instance(), &ICore::saveSettingsRequested, this,
[this](ICore::SaveSettingsReason reason) {
// There's one saveSettings triggered after plugin loading intentionally.
// We do not want to save anything at that time.
static bool firstOne = true;
if (firstOne) {
if (reason == ICore::InitializationDone) {
qCDebug(perspectivesLog) << "FIRST SAVE SETTINGS REQUEST IGNORED";
firstOne = false;
} else {
qCDebug(perspectivesLog) << "SAVING SETTINGS";
savePersistentSettings();