forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user