From c978afb42eb41be1e4f805801ec822c92fe1b9f7 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 3 Jun 2019 16:03:53 +0200 Subject: [PATCH] Debugger: Use the new hint to determine why settings should be saved Change-Id: I5f8e2caceaa9769fc99e91bf1e29470fa17320bb Reviewed-by: Eike Ziller --- src/plugins/debugger/debuggermainwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index ca206d6e178..82bb009cc2d 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -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();