summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggermainwindow.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-06-03 16:03:53 +0200
committerhjk <hjk@qt.io>2019-06-11 15:56:20 +0000
commitc978afb42eb41be1e4f805801ec822c92fe1b9f7 (patch)
treecc3e5157fd7db97e5dcb48dc48f555016b19d3fa /src/plugins/debugger/debuggermainwindow.cpp
parent70fecd518eb198fa5038efa03f450bcf6ab2cba8 (diff)
downloadqt-creator-c978afb42eb41be1e4f805801ec822c92fe1b9f7.tar.gz
Debugger: Use the new hint to determine why settings should be saved
Change-Id: I5f8e2caceaa9769fc99e91bf1e29470fa17320bb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/debugger/debuggermainwindow.cpp')
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index ca206d6e17..82bb009cc2 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();